File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -104,10 +104,18 @@ jobs:
104104 - name : Install Mondoo Operator Helm chart
105105 env :
106106 BUILD_OPERATOR : ${{ inputs.build-operator }}
107+ GIT_REF_NAME : ${{ github.ref_name }}
107108 run : |
108109 HELM_ARGS="--set operator.createConfig=false"
109110 if [ "$BUILD_OPERATOR" = "true" ]; then
110111 HELM_ARGS="$HELM_ARGS --set controllerManager.manager.image.tag=$(make print-version) --set controllerManager.manager.imagePullPolicy=Never"
112+ else
113+ # Use the published image matching the git tag instead of the chart default
114+ if [ -z "$GIT_REF_NAME" ]; then
115+ echo "::error::GIT_REF_NAME is empty; cannot determine which published image to use"
116+ exit 1
117+ fi
118+ HELM_ARGS="$HELM_ARGS --set controllerManager.manager.image.tag=${GIT_REF_NAME}"
111119 fi
112120 helm install mondoo-operator charts/mondoo-operator -n mondoo-operator --create-namespace --wait $HELM_ARGS
113121
@@ -123,7 +131,11 @@ jobs:
123131 if [ "$BUILD_OPERATOR" = "true" ]; then
124132 EXTERNAL_INSTALLATION=1 make test/integration/ci
125133 else
126- EXTERNAL_INSTALLATION=1 K8S_DISTRO=gke VERSION="$GIT_REF_NAME" make test/integration/ci
134+ if [ -z "$GIT_REF_NAME" ]; then
135+ echo "::error::GIT_REF_NAME is empty; cannot determine published operator version"
136+ exit 1
137+ fi
138+ EXTERNAL_INSTALLATION=1 K8S_DISTRO=gke VERSION="${GIT_REF_NAME}" make test/integration/ci
127139 fi
128140
129141 - run : mv integration-tests.xml integration-tests-helm-${{ matrix.k8s-version }}.xml
You can’t perform that action at this time.
0 commit comments