Skip to content

Commit

Permalink
Add execution for node 16 & node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizcko committed Oct 29, 2024
1 parent c942f43 commit 7a66f8c
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/kv_read/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "VaultReadKV",
"dependencies": {
"axios": "0.21.1",
"azure-pipelines-task-lib": "3.1.10"
"azure-pipelines-task-lib": "4.17.3"
},
"engines": {
"node": ">=6"
Expand Down
14 changes: 12 additions & 2 deletions dist/kv_read/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "Fizcko",
"version": {
"Major": 5,
"Minor": 1,
"Minor": 2,
"Patch": 0
},
"instanceNameFormat": "Vault - Read KV secrets",
Expand Down Expand Up @@ -330,6 +330,16 @@
"target": "kv_read.js",
"argumentFormat": "",
"workingDirectory": ""
}
},
"Node16": {
"target": "kv_read.js",
"argumentFormat": "",
"workingDirectory": ""
},
"Node20_1": {
"target": "kv_read.js",
"argumentFormat": "",
"workingDirectory": ""
}
}
}
2 changes: 1 addition & 1 deletion dist/tool_create_file/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "CreateFile",
"dependencies": {
"azure-pipelines-task-lib": "3.1.10"
"azure-pipelines-task-lib": "4.17.3"
},
"engines": {
"node": ">=6"
Expand Down
10 changes: 8 additions & 2 deletions dist/tool_create_file/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "Fizcko",
"version": {
"Major": 5,
"Minor": 1,
"Minor": 2,
"Patch": 0
},
"instanceNameFormat": "Tool - Create a File",
Expand Down Expand Up @@ -113,6 +113,12 @@
"execution": {
"Node10": {
"target": "tool_create_file.js"
}
},
"Node16": {
"target": "tool_create_file.js"
},
"Node20_1": {
"target": "tool_create_file.js"
}
}
}
3 changes: 3 additions & 0 deletions overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ Parameters :
## Release note
### v5.2.0
- Add execution for node 16 & node 20
### v5.1.0
- Add the possibility to export Services Connection settings as output variables.
Check [Use output variables from the Service Connection](#Use-output-variables-from-the-Service-Connection) for more details.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "mocha ./test/run_all.js"
},
"dependencies": {
"azure-pipelines-task-lib": "3.1.10",
"azure-pipelines-task-lib": "4.17.3",
"typescript": "4.1.5"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions test/conf.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"task_node_version": 20,
"vault": {
"url": "http://127.0.0.1:8200",
"ignore_ssl": true,
Expand Down
13 changes: 5 additions & 8 deletions test/run_all.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,41 @@ const ttm = require('azure-pipelines-task-lib/mock-test');

describe('azure-devops-vault-interaction', function () {

it("kv_read", (done) => {
it("kv_read", async () => {

var tp = path.join(__dirname, "kv_read.js");
var tr = new ttm.MockTestRunner(tp);

var conf = require(path.join(__dirname, 'conf.json'));
process.env["AUTH"] = conf.vault.login_auth;

tr.run();
await tr.runAsync(conf.task_node_version);

try {
assert(tr.succeeded, "Should have succeeded");
console.log("STDOUT", tr.stdout);
done();
}
catch (error) {
console.log("STDERR", tr.stderr);
console.log("STDOUT", tr.stdout);
done(error);
}
}).timeout(10000);

it("tool_create_file", (done) => {
it("tool_create_file", async () => {

var tp = path.join(__dirname, "tool_create_file.js");
var tr = new ttm.MockTestRunner(tp);

tr.run();
var conf = require(path.join(__dirname, 'conf.json'));
await tr.runAsync(conf.task_node_version);

try {
assert(tr.succeeded, "Should have succeeded");
console.log("STDOUT", tr.stdout);
done();
}
catch (error) {
console.log("STDERR", tr.stderr);
console.log("STDOUT", tr.stdout);
done(error);
}
}).timeout(10000);
});
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "azure-devops-vault-interaction",
"name": "Vault Interaction",
"version": "5.1.0",
"version": "5.2.0",
"publisher": "Fizcko",
"public": true,
"targets": [
Expand Down

0 comments on commit 7a66f8c

Please sign in to comment.