Skip to content

Commit

Permalink
Fix conformance release workflow (#1198)
Browse files Browse the repository at this point in the history
Problem: The job used in the conformance tests to wait for the release to exist wasn't working properly. It only saw jobs in progress, and not jobs that are pending, which is what we needed to wait for.

Solution: Removed the action and replaced with a basic polling loop to ensure the NGF images exist before continuing with the tests.
  • Loading branch information
sjberman authored Oct 26, 2023
1 parent 5ff3ffa commit 6999127
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
schedule:
- cron: "0 4 * * *" # run every day at 4am UTC

defaults:
run:
shell: bash

concurrency:
group: ${{ github.ref_name }}-conformance
cancel-in-progress: true
Expand Down Expand Up @@ -134,19 +138,16 @@ jobs:

- name: Wait for release to exist
if: startsWith(github.ref, 'refs/tags/')
uses: lewagon/wait-on-check-action@e106e5c43e8ca1edea6383a39a01c5ca495fd812 # v1.3.1
with:
ref: ${{ github.ref }}
check-name: 'Build Image'
repo-token: ${{ secrets.GITHUB_TOKEN }}
run: |
REF=${{ github.ref_name }}
until docker pull ghcr.io/nginxinc/nginx-gateway-fabric:${REF#v}; do sleep 5; done
until docker pull ghcr.io/nginxinc/nginx-gateway-fabric/nginx:${REF#v}; do sleep 5; done
- name: Setup conformance tests
run: |
ngf_prefix=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 1)
ngf_tag=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 2)
if [ ${{ github.event_name }} == "schedule" ]; then
export GW_API_VERSION=main
fi
if [ ${{ github.event_name }} == "schedule" ]; then export GW_API_VERSION=main; fi
make install-ngf-local-no-build NGF_PREFIX=${ngf_prefix} NGF_TAG=${ngf_tag}
working-directory: ./conformance

Expand Down

0 comments on commit 6999127

Please sign in to comment.