Skip to content

Commit 59dda24

Browse files
authored
Fix Helm tests on release tag (#1255)
Fix Helm tests on release tag and replace cut commands. Problem: Helm tests fail on release tag because the kind load command did not work when the provided images spanned multiple lines. Also, cut commands did not work as input was not a single value. Solution: Instead of using steps.*.outputs.tags which can output multiple lines, changed to use the hardcoded path to the image and a specific version.
1 parent ab9ead5 commit 59dda24

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,21 +221,21 @@ jobs:
221221
kube_config=${{ github.workspace }}/deploy/helm-chart/kube-${{ github.run_id }}-helm
222222
make create-kind-cluster KIND_KUBE_CONFIG=${kube_config}
223223
echo "KUBECONFIG=${kube_config}" >> "$GITHUB_ENV"
224-
kind load docker-image ${{ steps.ngf-meta.outputs.tags }} ${{ steps.nginx-meta.outputs.tags }}
224+
kind load docker-image ghcr.io/nginxinc/nginx-gateway-fabric:${{ steps.ngf-meta.outputs.version }} ghcr.io/nginxinc/nginx-gateway-fabric/nginx:${{ steps.nginx-meta.outputs.version }}
225225
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/standard-install.yaml
226226
227227
- name: Install Chart
228228
run: >
229229
helm install
230-
helm-$(echo ${{ steps.ngf-meta.outputs.tags }} | tr '.' '-' | cut -d ":" -f 2)
230+
helm-$(echo ${{ steps.nginx-meta.outputs.version }} | tr '.' '-')
231231
.
232232
--wait
233233
--create-namespace
234-
--set nginxGateway.image.repository=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 1)
235-
--set nginxGateway.image.tag=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 2)
234+
--set nginxGateway.image.repository=ghcr.io/nginxinc/nginx-gateway-fabric
235+
--set nginxGateway.image.tag=${{ steps.ngf-meta.outputs.version }}
236236
--set nginxGateway.image.pullPolicy=Never
237-
--set nginx.image.repository=$(echo ${{ steps.nginx-meta.outputs.tags }} | cut -d ":" -f 1)
238-
--set nginx.image.tag=$(echo ${{ steps.nginx-meta.outputs.tags }} | cut -d ":" -f 2)
237+
--set nginx.image.repository=ghcr.io/nginxinc/nginx-gateway-fabric/nginx
238+
--set nginx.image.tag=${{ steps.nginx-meta.outputs.version }}
239239
--set nginx.image.pullPolicy=Never
240240
--set service.type=NodePort
241241
-n nginx-gateway

.github/workflows/conformance.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ jobs:
7272
7373
- name: Prepare NGF files
7474
run: |
75-
ngf_prefix=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 1)
76-
ngf_tag=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 2)
77-
make update-ngf-manifest PREFIX=${ngf_prefix} TAG=${ngf_tag}
75+
ngf_prefix=ghcr.io/nginxinc/nginx-gateway-fabric
76+
ngf_tag=${{ steps.ngf-meta.outputs.version }}
77+
make update-ngf-manifest NGF_PREFIX=${ngf_prefix} NGF_TAG=${ngf_tag}
7878
working-directory: ./conformance
7979

8080
- name: Build binary
@@ -142,8 +142,8 @@ jobs:
142142
143143
- name: Setup conformance tests
144144
run: |
145-
ngf_prefix=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 1)
146-
ngf_tag=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 2)
145+
ngf_prefix=ghcr.io/nginxinc/nginx-gateway-fabric
146+
ngf_tag=${{ steps.ngf-meta.outputs.version }}
147147
if [ ${{ github.event_name }} == "schedule" ]; then export GW_API_VERSION=main; fi
148148
if [ ${{ startsWith(matrix.k8s-version, '1.23') || startsWith(matrix.k8s-version, '1.24') }} == "true" ]; then export INSTALL_WEBHOOK=true; fi
149149
make install-ngf-local-no-build PREFIX=${ngf_prefix} TAG=${ngf_tag}

0 commit comments

Comments
 (0)