From c6e23e70c1cdc1f74e4322799ff19d52988adbca Mon Sep 17 00:00:00 2001 From: Ciara Stacke Date: Thu, 16 Oct 2025 16:27:11 +0100 Subject: [PATCH] Run nightly on production runners, ignore .git for vm sync --- .github/workflows/ci.yml | 16 ++++------------ tests/scripts/sync-files-to-vm.sh | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a567ffcc4..9ccbe60be3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]]; then echo "No Artifactory secrets available - using direct GOPROXY" GOPROXY_VALUE="direct" - elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/main" ]]; then + elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ ("${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule") && "${{ github.ref }}" == "refs/heads/main" ]]; then echo "Production mode - using production Artifactory" GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_ENDPOINT }}" else @@ -167,7 +167,7 @@ jobs: binary: name: Build Binary - runs-on: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }} + runs-on: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }} needs: [vars, unit-tests, njs-unit-tests] outputs: json: ${{ steps.gateway_binaries.outputs.json }} @@ -187,7 +187,7 @@ jobs: if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]]; then echo "No Artifactory secrets available - using direct GOPROXY" GOPROXY_VALUE="direct" - elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/main" ]]; then + elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ ("${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule") && "${{ github.ref }}" == "refs/heads/main" ]]; then echo "Production mode - using production Artifactory" GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_ENDPOINT }}" else @@ -288,16 +288,8 @@ jobs: - name: Configure GOPROXY id: goproxy run: | - if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]]; then - echo "No Artifactory secrets available - using direct GOPROXY" - GOPROXY_VALUE="direct" - elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/main" ]]; then echo "Production mode - using production Artifactory" GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_ENDPOINT }}" - else - echo "Development mode - using dev Artifactory" - GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_DEV_ENDPOINT }}" - fi echo "GOPROXY=${GOPROXY_VALUE}" >> $GITHUB_ENV - name: Setup Golang Environment @@ -476,7 +468,7 @@ jobs: publish-helm: name: Package and Publish Helm Chart - runs-on: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }} + runs-on: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }} needs: [vars, helm-tests] if: ${{ (inputs.is_production_release && (inputs.dry_run == false || inputs.dry_run == null)) || (github.event_name == 'push' && ! startsWith(github.ref, 'refs/heads/release-')) }} permissions: diff --git a/tests/scripts/sync-files-to-vm.sh b/tests/scripts/sync-files-to-vm.sh index 5b44c03c16..b4905fd297 100755 --- a/tests/scripts/sync-files-to-vm.sh +++ b/tests/scripts/sync-files-to-vm.sh @@ -8,4 +8,4 @@ NGF_DIR=$(dirname "$PWD")/ gcloud compute config-ssh --ssh-config-file ngf-gcp.ssh >/dev/null -rsync -ave 'ssh -F ngf-gcp.ssh' "${NGF_DIR}" username@"${RESOURCE_NAME}"."${GKE_CLUSTER_ZONE}"."${GKE_PROJECT}":~/nginx-gateway-fabric +rsync -ave 'ssh -F ngf-gcp.ssh' --exclude '.git' "${NGF_DIR}" username@"${RESOURCE_NAME}"."${GKE_CLUSTER_ZONE}"."${GKE_PROJECT}":~/nginx-gateway-fabric