Skip to content

Commit e16fa89

Browse files
authored
Merge pull request #31 from nginxinc/zaowang/creating-shared-readme-and-release-json
Created shared readme and adjusted publishing fields.
2 parents 78e27e0 + 831d18f commit e16fa89

File tree

5 files changed

+49
-19
lines changed

5 files changed

+49
-19
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ jobs:
2020
run: |
2121
cd ./azure-pipeline/src
2222
npm install
23-
cd ..
2423
2524
- name: Install tfx-cli
2625
run: |
2726
npm install -g tfx-cli
2827
2928
- name: Create extension
3029
run: |
31-
tfx extension create --manifest-globs vss-extension.json
30+
tfx extension create --manifest-globs ./azure-pipeline/vss-extension.json
3231
3332
- name: Upload VSIX file
3433
uses: actions/upload-artifact@v2

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# NGINXaaS for Azure Configuration Automation
2+
3+
This repository hosts two essential projects that facilitate the management and deployment of NGINXaaS for Azure configurations. Both projects aim to automate the process of synchronizing NGINX configuration files, but they target different platforms and have unique features and notation. To learn more about NGINXaaS for Azure, please review the [product homepage](https://www.nginx.com/products/nginx/nginxaas-for-azure/).
4+
5+
## Projects
6+
7+
### 1. Azure Pipeline Task
8+
9+
This project provides a custom Azure pipeline task that automates the synchronization of NGINXaaS configuration files for Azure deployments. It supports both GitHub Action pipelines and Azure DevOps pipeline tasks. [Read more](./azure-pipeline/README.md).
10+
11+
### 2. GitHub Action Task
12+
13+
This GitHub Action enables continuous deployment through GitHub workflows to automatically update the NGINXaaS for Azure deployment when changes are made to the NGINX configuration files stored in the repository. It also supports updating NGINX certificates that are present in Azure key vault. [Read more](./github-action/README.md).
14+
15+
## Comparison
16+
17+
| Feature/Aspect | Azure Pipeline Task | GitHub Action Task |
18+
|------------------------------------|------------------------------------|-------------------------------------|
19+
| **CI/CD Automation** | Yes | Yes |
20+
| **Configuration File Host** | GitHub Repos or Azure Repos | GitHub |
21+
| **Security** | Pipelines in secured agents | Azure Login Action |
22+
| **Authentication Methods** | Service Connection | Service Principal with Secrets, OIDC|
23+
| **Certificate Handling** | No | Yes (Azure key vault) |
24+
| **CI/CD Platform** | Azure DevOps | GitHub |
25+
26+
## Getting Started
27+
28+
To get started with either of these projects, please refer to the detailed README files linked above.
29+
30+
## License
31+
32+
These projects are licensed under the Apache-2.0 License - see the [LICENSE.md](LICENSE) file for details.

azure-pipeline/src/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
ClientSecretCredential,
1919
AuthenticationError,
2020
} from '@azure/identity';
21-
import { info } from 'console';
2221

2322
/**
2423
* Class ConfigUpdater is responsible for updating the Nginx configuration.
@@ -111,14 +110,14 @@ class ConfigUpdater {
111110
* @throws {Error} If the Nginx configuration uploading fails.
112111
*/
113112
updateNginxConfig = async () => {
114-
console.log('updateNginxConfig...')
113+
console.log('updateNginxConfig... \n\tSubscription: ', validatedEnvVar(INPUT.subscription), '\n\tResource Group: ', validatedEnvVar(INPUT.resource), '\n\tDeployment: ', validatedEnvVar(INPUT.deployment), '\n\tSource: ', validatedEnvVar(INPUT.source), '\n\tTarget: ', validatedEnvVar(INPUT.target), '\n\tRoot File: ', validatedEnvVar(INPUT.rootFile));
115114
try {
116-
const res = await updateUserConfig(
115+
await updateUserConfig(
117116
this.getRequestResource(),
118117
await this.getConvertedFileObject(),
119118
await this.getRequestConfig(),
120119
);
121-
console.log('Nginx config successfully uploaded!');
120+
console.log('Nginx config uploaded successfully!');
122121
} catch (error) {
123122
taskLib.setResult(taskLib.TaskResult.Failed, error as any);
124123
throw new Error("Nginx config uploading failed!");

azure-pipeline/src/task.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/Microsoft/azure-pipelines-task-lib/master/tasks.schema.json",
33
"id": "4b016be0-afe8-4f76-ace3-d7f0355d9605",
4-
"name": "nginx-for-azure-config-sync",
5-
"friendlyName": "nginxconfigpush",
6-
"description": "This task is designed to synchronize Nginx configurations from an Azure DevOps repository or GitHub repository to NGINXaaS for Azure deployments.",
7-
"helpMarkDown": "Use this task to push Nginx configuration files from your repository to your NGINXaaS for Azure deployments",
8-
"category": "Utility",
9-
"author": "zaotest",
4+
"name": "nginx-config-sync-for-azure",
5+
"friendlyName": "NGINX Configuration Sync for Azure",
6+
"description": "This task automates the synchronization of NGINX configuration files from an Azure DevOps repository or GitHub repository to NGINXaaS for Azure deployments.",
7+
"helpMarkDown": "Use this task to seamlessly push NGINX configuration files from your repository to your NGINXaaS for Azure deployments, ensuring consistency and efficiency in your deployment management.",
8+
"category": "Azure Pipelines",
9+
"author": "F5 Networks, Inc.",
1010
"version": {
11-
"Major": 2,
11+
"Major": 1,
1212
"Minor": 0,
1313
"Patch": 0
1414
},

azure-pipeline/vss-extension.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"manifestVersion": 1,
3-
"id": "nginx-config-sync-for-azure",
4-
"name": "nginx-config-sync-for-azure",
5-
"version": "2.0.0",
6-
"publisher": "ZaoWang",
3+
"id": "nginxaas-for-azure-config-sync",
4+
"name": "NGINX Configuration Sync for Azure",
5+
"version": "1.0.0",
6+
"publisher": "F5 Networks, Inc.",
77
"targets": [
88
{
99
"id": "Microsoft.VisualStudio.Services"
1010
}
1111
],
12-
"description": "Zao's tool for uploading nginx config",
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.",
1313
"categories": [
1414
"Azure Pipelines"
1515
],
@@ -41,7 +41,7 @@
4141
"galleryFlags": [
4242
"Public"
4343
],
44-
"public": false,
44+
"public": true,
4545
"tags":[
4646
"Build task",
4747
"Deploy task"

0 commit comments

Comments
 (0)