Skip to content

Fixed syntax error in test job #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 43 additions & 42 deletions .github/workflows/testNginxForAzureDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Test Github action to update NGINX for Azure configurations
on:
schedule:
- cron: '0 20 * * *'
- cron: '*/5 * * * *'

env:
NGINX_DEPLOYMENT_NAME: githhubci-test-dep
Expand All @@ -19,46 +20,46 @@ jobs:
Update-NGINX-Configuration:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v2
- name: 'AZ CLI Login'
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
- name: 'Checkout repository'
uses: actions/checkout@v2
- name: 'AZ CLI Login'
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: 'Update config - single file'
shell: bash
run: |
echo "RANDOM=$((RANDOM%10))" >> $GITHUB_ENV
sed -i 's/000000/'"${ env.RANDOM }"'/g' tests/configs/single/nginx.conf
- name: 'Sync NGINX configuration to NGINX on Azure instance - single file'
uses: nginxinc/nginx-for-azure-deploy-action@v0
with:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: 'Update config - single file'
shell: bash
run: |
echo "RANDOM=$((RANDOM%10))" >> $GITHUB_ENV
sed -i 's/000000/'"${ env.RANDOM }"'/g' tests/configs/single/nginx.conf
- name: 'Sync NGINX configuration to NGINX on Azure instance - single file'
uses: nginxinc/nginx-for-azure-deploy-action@v0
with:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resource-group-name: $TEST_RESOURCE_GROUP_NAME
nginx-deployment-name: $NGINX_DEPLOYMENT_NAME
nginx-config-directory-path: tests/configs/single/
nginx-root-config-file: $NGINX_ROOT_CONFIG_FILE
transformed-nginx-config-directory-path: $NGINX_TRANSFORMED_CONFIG_DIR_PATH
- name: 'Validate config update - single file'
shell: bash
run: |
wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"${ env.RANDOM }"'")'
- name: 'Update config - multi file'
shell: bash
run: |
sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' tests/configs/multi/conf.d/proxy.conf
- name: 'Sync NGINX configuration to NGINX on Azure instance - multi file'
uses: nginxinc/nginx-for-azure-deploy-action@v0
with:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resource-group-name: $TEST_RESOURCE_GROUP_NAME
nginx-deployment-name: $NGINX_DEPLOYMENT_NAME
nginx-config-directory-path: tests/configs/multi/
nginx-root-config-file: $NGINX_ROOT_CONFIG_FILE
transformed-nginx-config-directory-path: $NGINX_TRANSFORMED_CONFIG_DIR_PATH
- name: 'Validate config update'
shell: bash
run: |
wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_ID"'")'
resource-group-name: $TEST_RESOURCE_GROUP_NAME
nginx-deployment-name: $NGINX_DEPLOYMENT_NAME
nginx-config-directory-path: tests/configs/single/
nginx-root-config-file: $NGINX_ROOT_CONFIG_FILE
transformed-nginx-config-directory-path: $NGINX_TRANSFORMED_CONFIG_DIR_PATH
- name: 'Validate config update - single file'
shell: bash
run: |
wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"${ env.RANDOM }"'")'
- name: 'Update config - multi file'
shell: bash
run: |
sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' tests/configs/multi/conf.d/proxy.conf
- name: 'Sync NGINX configuration to NGINX on Azure instance - multi file'
uses: nginxinc/nginx-for-azure-deploy-action@v0
with:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resource-group-name: $TEST_RESOURCE_GROUP_NAME
nginx-deployment-name: $NGINX_DEPLOYMENT_NAME
nginx-config-directory-path: tests/configs/multi/
nginx-root-config-file: $NGINX_ROOT_CONFIG_FILE
transformed-nginx-config-directory-path: $NGINX_TRANSFORMED_CONFIG_DIR_PATH
- name: 'Validate config update'
shell: bash
run: |
wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_ID"'")'