Skip to content

Commit 5f8216c

Browse files
committed
Bumped tag of action we are using in tests and fixed a few test bugs.
1 parent 8f4afca commit 5f8216c

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.github/workflows/testNginxForAzureDeploy.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
sed -i 's/000000/'"$GITHUB_RUN_NUMBER"'/g' test/configs/single/nginx.conf
3737
cat test/configs/single/nginx.conf
3838
- name: "Sync NGINX configuration to NGINX for Azure - single file"
39-
uses: nginxinc/[email protected].0
39+
uses: nginxinc/[email protected].1
4040
with:
4141
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
4242
resource-group-name: $TEST_RESOURCE_GROUP_NAME
@@ -52,33 +52,30 @@ jobs:
5252
shell: bash
5353
run: |
5454
sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' test/configs/multi/nginx.conf
55-
cat test/configs/single/nginx.conf
55+
cat test/configs/multi/nginx.conf
5656
sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' test/configs/multi/conf.d/proxy.conf
5757
cat test/configs/multi/conf.d/proxy.conf
5858
- name: "Sync NGINX configuration and certificate to NGINX for Azure - multi file"
59-
uses: nginxinc/[email protected].0
59+
uses: nginxinc/[email protected].1
6060
with:
6161
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
6262
resource-group-name: $TEST_RESOURCE_GROUP_NAME
6363
nginx-deployment-name: $NGINX_DEPLOYMENT_NAME
64-
nginx-resource-location: "westcentralus"
64+
nginx-deployment-location: "westcentralus"
6565
nginx-config-directory-path: test/configs/multi/
6666
nginx-root-config-file: $NGINX_ROOT_CONFIG_FILE
6767
transformed-nginx-config-directory-path: $NGINX_TRANSFORMED_CONFIG_DIR_PATH
68-
nginx-certificate-details: '[{"certificateName": "$NGINX_CERT_NAME", "keyvaultSecret": "https://$NGINX_VAULT_NAME.vault.azure.net/secrets/$NGINX_CERT_NAME", "certificateVirtualPath": "/etc/nginx/ssl/$GITHUB_RUN_NUMBER/my-cert.crt", "keyVirtualPath": "/etc/nginx/ssl/$GITHUB_RUN_NUMBER/my-cert.key" } ]'
68+
nginx-certificate-details: '[{"certificateName": "$NGINX_CERT_NAME", "keyvaultSecret": "https://$NGINX_VAULT_NAME.vault.azure.net/secrets/$NGINX_CERT_NAME", "certificateVirtualPath": "/etc/nginx/ssl/$GITHUB_RUN_ID/my-cert.crt", "keyVirtualPath": "/etc/nginx/ssl/$GITHUB_RUN_ID/my-cert.key" } ]'
6969

7070
- name: "Validate config update"
7171
shell: bash
7272
run: |
7373
wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_ID"'")'
74-
- name: "Create cert file"
74+
- name: "Validate certificate update"
7575
uses: azure/CLI@v1
7676
with:
7777
inlineScript: |
7878
echo "-----BEGIN CERTIFICATE-----" > /tmp/$GITHUB_RUN_ID.tmp
7979
az keyvault certificate show --vault-name $NGINX_VAULT_NAME -n $NGINX_CERT_NAME | jq -r .cer | cat >> /tmp/$GITHUB_RUN_ID.tmp
8080
echo "-----END CERTIFICATE-----" >> /tmp/$GITHUB_RUN_ID.tmp
81-
- name: "Validate certificate update"
82-
shell: bash
83-
run: |
84-
wget -O - -o /dev/null https://${{ secrets.NGINX_DEPLOYMENT_IP }} --ca-certificate=/tmp/$GITHUB_RUN_ID.tmp | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_ID"'")'
81+
wget -O - -o /dev/null https://${{ secrets.NGINX_DEPLOYMENT_IP }} --ca-certificate=/tmp/$GITHUB_RUN_ID.tmp | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_ID"'")'

0 commit comments

Comments
 (0)