File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -102,17 +102,29 @@ jobs:
102102 run : for i in 1 2 3 4 5; do kubectl -n kube-system wait --for=condition=Ready pods --all --timeout=180s && break || sleep 10; done
103103
104104 - name : Install Mondoo Operator Helm chart
105+ env :
106+ BUILD_OPERATOR : ${{ inputs.build-operator }}
105107 run : |
106108 HELM_ARGS="--set operator.createConfig=false"
107- if [ "${{ inputs.build-operator }} " = "true" ]; then
109+ if [ "$BUILD_OPERATOR " = "true" ]; then
108110 HELM_ARGS="$HELM_ARGS --set controllerManager.manager.image.tag=$(make print-version) --set controllerManager.manager.imagePullPolicy=Never"
109111 fi
110112 helm install mondoo-operator charts/mondoo-operator -n mondoo-operator --create-namespace --wait $HELM_ARGS
111113
112114 - name : Run integration tests
113115 env :
114116 MONDOO_API_TOKEN : ${{ secrets.MONDOO_TEST_ORG_TOKEN }}
115- run : EXTERNAL_INSTALLATION=1 make test/integration/ci
117+ BUILD_OPERATOR : ${{ inputs.build-operator }}
118+ GIT_REF_NAME : ${{ github.ref_name }}
119+ run : |
120+ # When using a pre-built image (build-operator=false), skip the minikube image
121+ # load step (K8S_DISTRO=gke) and pass the git tag as VERSION so the version
122+ # check matches the published operator binary.
123+ if [ "$BUILD_OPERATOR" = "true" ]; then
124+ EXTERNAL_INSTALLATION=1 make test/integration/ci
125+ else
126+ EXTERNAL_INSTALLATION=1 K8S_DISTRO=gke VERSION="$GIT_REF_NAME" make test/integration/ci
127+ fi
116128
117129 - run : mv integration-tests.xml integration-tests-helm-${{ matrix.k8s-version }}.xml
118130 if : success() || failure()
You can’t perform that action at this time.
0 commit comments