Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 5 additions & 6 deletions .github/workflows/azure-pipeline-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v2
with:
node-version: '20'
node-version: '14'

- name: Install dependencies and build
run: |
Expand All @@ -27,11 +27,10 @@ jobs:

- name: Create extension
run: |
cd azure-pipeline
tfx extension create --manifest-globs ./vss-extension.json
tfx extension create --manifest-globs ./azure-pipeline/vss-extension.json

- name: Upload VSIX file
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v2
with:
name: VSIX file
path: ./azure-pipeline/*.vsix
19 changes: 10 additions & 9 deletions .github/workflows/github-action-test-nginxaas-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
- cron: "0 20 * * *"

env:
NGINX_DEPLOYMENT_NAME: n4a-long-eastus2-basic-ngx
NGINX_DEPLOYMENT_NAME: github-action-test-dep
NGINX_TRANSFORMED_CONFIG_DIR_PATH: /etc/nginx/
NGINX_ROOT_CONFIG_FILE: nginx.conf
TEST_RESOURCE_GROUP_NAME: n4a-long-eastus2-workload
NGINX_CERT_NAME: n4a-long-eastus2-basic-crt
TEST_RESOURCE_GROUP_NAME: github-action-test
NGINX_CERT_NAME: github-action-test-crt
NGINX_VAULT_NAME: nlbtest-customer

permissions:
Expand All @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
uses: actions/checkout@v2
- name: "AZ CLI Login"
uses: azure/login@v2
with:
Expand All @@ -47,7 +47,7 @@ jobs:
- name: "Validate config update - single file"
shell: bash
run: |
curl -s -o /dev/null -D - http://${{ secrets.NGINX_DEPLOYMENT_FQDN }} | grep "Github-Run-Id: $GITHUB_RUN_ID"
curl -s -o /dev/null -D - http://${{ secrets.NGINX_DEPLOYMENT_IP }} | grep "Github-Run-Id: $GITHUB_RUN_ID"
- name: "Update config - multi file"
shell: bash
run: |
Expand All @@ -61,20 +61,21 @@ jobs:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resource-group-name: $TEST_RESOURCE_GROUP_NAME
nginx-deployment-name: $NGINX_DEPLOYMENT_NAME
nginx-deployment-location: "eastus2"
nginx-deployment-location: "westcentralus"
nginx-config-directory-path: github-action/test/configs/multi/
nginx-root-config-file: $NGINX_ROOT_CONFIG_FILE
transformed-nginx-config-directory-path: $NGINX_TRANSFORMED_CONFIG_DIR_PATH
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" } ]'
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" } ]'

- name: "Validate config update"
shell: bash
run: |
curl -s -o /dev/null -D - http://${{ secrets.NGINX_DEPLOYMENT_FQDN }} | grep "Github-Run-Id: $GITHUB_RUN_ID"
curl -s -o /dev/null -D - http://${{ secrets.NGINX_DEPLOYMENT_IP }} | grep "Github-Run-Id: $GITHUB_RUN_ID"
- name: "Validate certificate update"
uses: azure/cli@v2
with:
inlineScript: |
echo "-----BEGIN CERTIFICATE-----" > /tmp/$GITHUB_RUN_ID.tmp
az keyvault certificate show --vault-name $NGINX_VAULT_NAME -n $NGINX_CERT_NAME | jq -r .cer | cat >> /tmp/$GITHUB_RUN_ID.tmp
echo "-----END CERTIFICATE-----" >> /tmp/$GITHUB_RUN_ID.tmp
curl -s -o /dev/null -D - https://${{ secrets.NGINX_DEPLOYMENT_FQDN }} --cacert /tmp/$GITHUB_RUN_ID.tmp | grep "Github-Run-Id: $GITHUB_RUN_ID"
curl -s -o /dev/null -D - https://${{ secrets.NGINX_DEPLOYMENT_IP }} --cacert /tmp/$GITHUB_RUN_ID.tmp | grep "Github-Run-Id: $GITHUB_RUN_ID"
2 changes: 1 addition & 1 deletion azure-pipeline/src/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
}
],
"execution": {
"Node20_1": {
"Node10": {
"target": "dist/index.js"
}
}
Expand Down
2 changes: 1 addition & 1 deletion azure-pipeline/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"id": "Microsoft.VisualStudio.Services"
}
],
"description": "This extension provides a streamlined solution for synchronizing NGINX configuration files with Azure deployments.",
"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.",
"categories": [
"Azure Pipelines"
],
Expand Down