Skip to content

Commit 7374a97

Browse files
authored
Run nightly on production runners, ignore .git for vm sync (#4087)
1 parent 7f40f9e commit 7374a97

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]]; then
6161
echo "No Artifactory secrets available - using direct GOPROXY"
6262
GOPROXY_VALUE="direct"
63-
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/main" ]]; then
63+
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ ("${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule") && "${{ github.ref }}" == "refs/heads/main" ]]; then
6464
echo "Production mode - using production Artifactory"
6565
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_ENDPOINT }}"
6666
else
@@ -167,7 +167,7 @@ jobs:
167167

168168
binary:
169169
name: Build Binary
170-
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' }}
170+
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' }}
171171
needs: [vars, unit-tests, njs-unit-tests]
172172
outputs:
173173
json: ${{ steps.gateway_binaries.outputs.json }}
@@ -187,7 +187,7 @@ jobs:
187187
if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]]; then
188188
echo "No Artifactory secrets available - using direct GOPROXY"
189189
GOPROXY_VALUE="direct"
190-
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/main" ]]; then
190+
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ ("${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule") && "${{ github.ref }}" == "refs/heads/main" ]]; then
191191
echo "Production mode - using production Artifactory"
192192
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_ENDPOINT }}"
193193
else
@@ -288,16 +288,8 @@ jobs:
288288
- name: Configure GOPROXY
289289
id: goproxy
290290
run: |
291-
if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]]; then
292-
echo "No Artifactory secrets available - using direct GOPROXY"
293-
GOPROXY_VALUE="direct"
294-
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/main" ]]; then
295291
echo "Production mode - using production Artifactory"
296292
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_ENDPOINT }}"
297-
else
298-
echo "Development mode - using dev Artifactory"
299-
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_DEV_ENDPOINT }}"
300-
fi
301293
echo "GOPROXY=${GOPROXY_VALUE}" >> $GITHUB_ENV
302294
303295
- name: Setup Golang Environment
@@ -476,7 +468,7 @@ jobs:
476468

477469
publish-helm:
478470
name: Package and Publish Helm Chart
479-
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' }}
471+
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' }}
480472
needs: [vars, helm-tests]
481473
if: ${{ (inputs.is_production_release && (inputs.dry_run == false || inputs.dry_run == null)) || (github.event_name == 'push' && ! startsWith(github.ref, 'refs/heads/release-')) }}
482474
permissions:

tests/scripts/sync-files-to-vm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ NGF_DIR=$(dirname "$PWD")/
88

99
gcloud compute config-ssh --ssh-config-file ngf-gcp.ssh >/dev/null
1010

11-
rsync -ave 'ssh -F ngf-gcp.ssh' "${NGF_DIR}" username@"${RESOURCE_NAME}"."${GKE_CLUSTER_ZONE}"."${GKE_PROJECT}":~/nginx-gateway-fabric
11+
rsync -ave 'ssh -F ngf-gcp.ssh' --exclude '.git' "${NGF_DIR}" username@"${RESOURCE_NAME}"."${GKE_CLUSTER_ZONE}"."${GKE_PROJECT}":~/nginx-gateway-fabric

0 commit comments

Comments
 (0)