Skip to content

Commit 81714b5

Browse files
committed
Point to longevity basic nginxaas deployment
1 parent a625b59 commit 81714b5

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

.github/workflows/azure-pipeline-build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313

1414
- name: Set up Node.js
15-
uses: actions/setup-node@v2
15+
uses: actions/setup-node@v4
1616
with:
17-
node-version: '14'
17+
node-version: '20'
1818

1919
- name: Install dependencies and build
2020
run: |
@@ -27,10 +27,11 @@ jobs:
2727
2828
- name: Create extension
2929
run: |
30-
tfx extension create --manifest-globs ./azure-pipeline/vss-extension.json
30+
cd azure-pipeline
31+
tfx extension create --manifest-globs ./vss-extension.json
3132
3233
- name: Upload VSIX file
33-
uses: actions/upload-artifact@v2
34+
uses: actions/upload-artifact@v4
3435
with:
3536
name: VSIX file
3637
path: ./azure-pipeline/*.vsix

.github/workflows/github-action-test-nginxaas-deploy.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
name: Test Github action to update NGINX as a Service (NGINXaaS) for Azure configurations
44
on:
5+
workflow_dispatch:
56
schedule:
67
- cron: "0 20 * * *"
78

89
env:
9-
NGINX_DEPLOYMENT_NAME: github-action-test-dep
10+
NGINX_DEPLOYMENT_NAME: n4a-long-eastus2-basic-ngx
1011
NGINX_TRANSFORMED_CONFIG_DIR_PATH: /etc/nginx/
1112
NGINX_ROOT_CONFIG_FILE: nginx.conf
12-
TEST_RESOURCE_GROUP_NAME: github-action-test
13-
NGINX_CERT_NAME: github-action-test-crt
13+
TEST_RESOURCE_GROUP_NAME: n4a-long-eastus2-workload
14+
NGINX_CERT_NAME: n4a-long-eastus2-basic-crt
1415
NGINX_VAULT_NAME: nlbtest-customer
1516

1617
permissions:
@@ -22,13 +23,13 @@ jobs:
2223
runs-on: ubuntu-latest
2324
steps:
2425
- name: "Checkout repository"
25-
uses: actions/checkout@v2
26+
uses: actions/checkout@v4
2627
- name: "AZ CLI Login"
27-
uses: azure/login@v2
28-
with:
29-
client-id: ${{ secrets.AZURE_CLIENT_ID }}
30-
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
31-
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
28+
run: |
29+
az login --service-principal \
30+
--username "${{ secrets.AZURE_CLIENT_ID }}" \
31+
--password "${{ secrets.AZURE_CLIENT_SECRET }}" \
32+
--tenant "${{ secrets.AZURE_TENANT_ID }}"
3233
3334
- name: "Update config - single file"
3435
shell: bash
@@ -47,7 +48,7 @@ jobs:
4748
- name: "Validate config update - single file"
4849
shell: bash
4950
run: |
50-
curl -s -o /dev/null -D - http://${{ secrets.NGINX_DEPLOYMENT_IP }} | grep "Github-Run-Id: $GITHUB_RUN_ID"
51+
curl -s -o /dev/null -D - http://${{ secrets.NGINX_DEPLOYMENT_FQDN }} | grep "Github-Run-Id: $GITHUB_RUN_ID"
5152
- name: "Update config - multi file"
5253
shell: bash
5354
run: |
@@ -61,21 +62,20 @@ jobs:
6162
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
6263
resource-group-name: $TEST_RESOURCE_GROUP_NAME
6364
nginx-deployment-name: $NGINX_DEPLOYMENT_NAME
64-
nginx-deployment-location: "westcentralus"
65+
nginx-deployment-location: "eastus2"
6566
nginx-config-directory-path: github-action/test/configs/multi/
6667
nginx-root-config-file: $NGINX_ROOT_CONFIG_FILE
6768
transformed-nginx-config-directory-path: $NGINX_TRANSFORMED_CONFIG_DIR_PATH
68-
nginx-certificates: '[{"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" } ]'
69-
69+
nginx-certificates: '[{"certificateName": "github-action-test-crt", "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" } ]'
7070
- name: "Validate config update"
7171
shell: bash
7272
run: |
73-
curl -s -o /dev/null -D - http://${{ secrets.NGINX_DEPLOYMENT_IP }} | grep "Github-Run-Id: $GITHUB_RUN_ID"
73+
curl -s -o /dev/null -D - http://${{ secrets.NGINX_DEPLOYMENT_FQDN }} | grep "Github-Run-Id: $GITHUB_RUN_ID"
7474
- name: "Validate certificate update"
7575
uses: azure/cli@v2
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-
curl -s -o /dev/null -D - https://${{ secrets.NGINX_DEPLOYMENT_IP }} --cacert /tmp/$GITHUB_RUN_ID.tmp | grep "Github-Run-Id: $GITHUB_RUN_ID"
81+
curl -s -o /dev/null -D - https://${{ secrets.NGINX_DEPLOYMENT_FQDN }} --cacert /tmp/$GITHUB_RUN_ID.tmp | grep "Github-Run-Id: $GITHUB_RUN_ID"

azure-pipeline/src/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
}
7575
],
7676
"execution": {
77-
"Node10": {
77+
"Node20_1": {
7878
"target": "dist/index.js"
7979
}
8080
}

azure-pipeline/vss-extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"id": "Microsoft.VisualStudio.Services"
1010
}
1111
],
12-
"description": "This extension provides a streamlined solution for synchronizing NGINX configuration files with Azure deployments. Designed to support Azure DevOps pipelines, it automates the process of packaging and uploading NGINX configurations to Azure, enhancing efficiency, version control, and security. Ideal for continuous integration and deployment workflows, it simplifies the management of NGINXaaS configurations within the Azure ecosystem.",
12+
"description": "This extension provides a streamlined solution for synchronizing NGINX configuration files with Azure deployments.",
1313
"categories": [
1414
"Azure Pipelines"
1515
],

0 commit comments

Comments
 (0)