File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 77 description : ' the git ref for the associated workflow'
88 type : string
99 required : true
10+ test :
11+ description : ' Is this a test run?'
12+ type : boolean
13+ required : true
1014
1115jobs :
1216 build-and-test :
7781 sudo chown $(id -u):$(id -g) $HOME/.kube/config
7882 until sudo microk8s status --wait-ready; do sleep 5s; echo "Try again"; done
7983
84+ - name : Update workload tag for test images
85+ if : ${{ inputs.test }}
86+ run : make update-workload-tag
87+ env :
88+ WORKLOAD_TAG : " test"
89+ working-directory : node-installer
90+
8091 - name : Run KIND test
8192 if : matrix.distribution == 'kind'
8293 run : make test-kind
Original file line number Diff line number Diff line change 2828 if : ${{ ! github.event.pull_request.head.repo.fork }}
2929 with :
3030 ref : ${{ github.ref }}
31+ test : true
3132 test :
3233 needs : build
3334 uses : ./.github/workflows/action-test.yml
Original file line number Diff line number Diff line change 1919 needs : build
2020 with :
2121 ref : ${{ github.ref }}
22+ test : false
2223
2324 release :
2425 permissions :
Original file line number Diff line number Diff line change 11SPIN_VERSION = v2
22IMAGE_NAME ?= ghcr.io/spinkube/containerd-shim-spin/node-installer
3+ WORKLOAD_TAG ?= ""
34
45# we only support x86_64 and aarch64 on Linux
56UNAME := $(shell uname -m)
@@ -33,6 +34,16 @@ build-multi-installer-image: $(BINARY)
3334build-dev-installer-image : $(BINARY )
3435 docker buildx build -t $(IMAGE_NAME ) --load --platform $(PLATFORM ) .
3536
37+ # Updates the tag of the test application image to be the value set in `WORKLOAD_TAG`. Used for testing non-release builds.
38+ update-workload-tag :
39+ @VERSION=v$$(sed -n 's/^version = "\([^"]*\ ) " /\1/p' ../Cargo.toml); \
40+ if [ -n " $( WORKLOAD_TAG) " ]; then \
41+ sed -i " s/$$ VERSION/$( WORKLOAD_TAG) /g" ../deployments/workloads/workload.yaml; \
42+ echo " Replaced version $$ VERSION with $( WORKLOAD_TAG) in ../deployments/workloads/workload.yaml" ; \
43+ else \
44+ echo " WORKLOAD_TAG is not set. No replacements made." ; \
45+ fi
46+
3647test-kind :
3748 ./tests/integration-test-kind.sh
3849
You can’t perform that action at this time.
0 commit comments