Skip to content

Commit

Permalink
Version Bump of azure-pipelines-tasks-docker-common (#19889)
Browse files Browse the repository at this point in the history
* version bump of  azure-pipelines-tasks-docker-common

* Changed the package version for Node 20

* changed the execution nodes to 16 and 20.

* Changing node version in Task.loc file

* Reordering the node versions

* [DockerComposeV0]
- Restore Node10 handler
- regenerated package-lock file on version 1

* [DockerComposeV0]
- Add test output

---------

Co-authored-by: nagarajku <151506811+nagarajku@users.noreply.github.com>
Co-authored-by: Dmitrii Bobreshev (Akvelon INC) <v-bobreshevd@microsoft.com>
  • Loading branch information
3 people authored May 27, 2024
1 parent e48898f commit 4826894
Show file tree
Hide file tree
Showing 19 changed files with 2,595 additions and 1,383 deletions.
38 changes: 24 additions & 14 deletions Tasks/DockerComposeV0/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ import * as assert from 'assert';
import * as ttm from 'azure-pipelines-task-lib/mock-test';
import tl = require('azure-pipelines-task-lib');

function runValidations(validator: () => void, tr, done) {
try {
validator();
done();
}
catch (error) {
console.log("STDERR", tr.stderr);
console.log("STDOUT", tr.stdout);
done(error);
}
}

describe('Docker Compose Suite', function() {
this.timeout(30000);
before((done) => {
Expand All @@ -27,13 +39,12 @@ describe('Docker Compose Suite', function() {
let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp);
process.env["__command__"] = "Build services";
tr.run();

assert(tr.invokedToolCount == 1, 'should have invoked tool one times. actual: ' + tr.invokedToolCount);
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr');
assert(tr.succeeded, 'task should have succeeded');
assert(tr.stdout.indexOf("[command]docker-compose -f F:\\dir2\\docker-compose.yml build") != -1, "docker compose build should run");
console.log(tr.stderr);
done();
runValidations(() => {
assert(tr.invokedToolCount == 1, 'should have invoked tool one times. actual: ' + tr.invokedToolCount);
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr');
assert(tr.succeeded, 'task should have succeeded');
assert(tr.stdout.indexOf("[command]docker-compose -f F:\\dir2\\docker-compose.yml build") != -1, "docker compose build should run");
}, tr, done);
});

it('Runs successfully for windows docker compose service build, using user defined dcoker compose exe', (done:Mocha.Done) => {
Expand Down Expand Up @@ -190,13 +201,12 @@ describe('Docker Compose Suite', function() {
let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp);
process.env["__command__"] = "Build services";
tr.run();

assert(tr.invokedToolCount == 1, 'should have invoked tool one times. actual: ' + tr.invokedToolCount);
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr');
assert(tr.succeeded, 'task should have succeeded');
assert(tr.stdout.indexOf("[command]docker-compose -f /tmp/tempdir/100/docker-compose.yml build") != -1, "docker compose build should run");
console.log(tr.stderr);
done();
runValidations(() => {
assert(tr.invokedToolCount == 1, 'should have invoked tool one times. actual: ' + tr.invokedToolCount);
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr');
assert(tr.succeeded, 'task should have succeeded');
assert(tr.stdout.indexOf("[command]docker-compose -f /tmp/tempdir/100/docker-compose.yml build") != -1, "docker compose build should run");
}, tr, done);
});

it('Runs successfully for linux docker compose service build, using user defined dcoker compose path', (done:Mocha.Done) => {
Expand Down
75 changes: 39 additions & 36 deletions Tasks/DockerComposeV0/_buildConfigs/Node20/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Tasks/DockerComposeV0/_buildConfigs/Node20/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@types/q": "^1.5.0",
"agent-base": "^6.0.2",
"azure-pipelines-task-lib": "4.4.0",
"azure-pipelines-tasks-docker-common": "2.225.0",
"azure-pipelines-tasks-docker-common": "2.226.0",
"del": "2.2.0",
"esprima": "2.7.1",
"js-yaml": "3.13.1"
Expand Down
Loading

0 comments on commit 4826894

Please sign in to comment.