7
7
8
8
env :
9
9
NGINX_DEPLOYMENT_NAME : githhubci-test-dep
10
- NGINX_CONFIG_FILE : test/configs/nginx.conf
10
+ NGINX_TRANSFORMED_CONFIG_DIR_PATH : /etc/nginx/
11
+ NGINX_ROOT_CONFIG_FILE : nginx.conf
11
12
TEST_RESOURCE_GROUP_NAME : testenv-0da38993-workload
12
13
13
14
permissions :
@@ -20,23 +21,42 @@ jobs:
20
21
steps :
21
22
- name : ' Checkout repository'
22
23
uses : actions/checkout@v2
23
- - name : ' Update config'
24
- shell : bash
25
- run : |
26
- sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' $NGINX_CONFIG_FILE
27
24
- name : ' AZ CLI Login'
28
25
uses : azure/login@v1
29
26
with :
30
27
client-id : ${{ secrets.AZURE_CLIENT_ID }}
31
28
tenant-id : ${{ secrets.AZURE_TENANT_ID }}
32
29
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
33
- - name : ' Sync NGINX configuration to NGINX on Azure instance'
30
+ - name : ' Update config'
31
+ shell : bash
32
+ run : |
33
+ sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' tests/configs/single/nginx.conf
34
+ - name : ' Sync NGINX configuration to NGINX on Azure instance - single file'
35
+ uses : nginxinc/nginx-for-azure-deploy-action@v0
36
+ with :
37
+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
38
+ resource-group-name : $TEST_RESOURCE_GROUP_NAME
39
+ nginx-deployment-name : $NGINX_DEPLOYMENT_NAME
40
+ nginx-config-directory-path : tests/configs/single/
41
+ nginx-root-config-file : $NGINX_ROOT_CONFIG_FILE
42
+ transformed-nginx-config-directory-path : $NGINX_TRANSFORMED_CONFIG_DIR_PATH
43
+ - name : ' Validate config update'
44
+ shell : bash
45
+ run : |
46
+ wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_ID"'")'
47
+ - name : ' Update config'
48
+ shell : bash
49
+ run : |
50
+ sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' tests/configs/multi/conf.d/proxy.conf
51
+ - name : ' Sync NGINX configuration to NGINX on Azure instance - multi file'
34
52
uses : nginxinc/nginx-for-azure-deploy-action@v0
35
53
with :
36
54
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
37
55
resource-group-name : $TEST_RESOURCE_GROUP_NAME
38
56
nginx-deployment-name : $NGINX_DEPLOYMENT_NAME
39
- nginx-config-relative-file-path : $NGINX_CONFIG_FILE
57
+ nginx-config-directory-path : tests/configs/multi/
58
+ nginx-root-config-file : $NGINX_ROOT_CONFIG_FILE
59
+ transformed-nginx-config-directory-path : $NGINX_TRANSFORMED_CONFIG_DIR_PATH
40
60
- name : ' Validate config update'
41
61
shell : bash
42
62
run : |
0 commit comments