Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update azure-pipelines-task-lib version #12484

Merged
merged 1 commit into from
Mar 5, 2020
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
20 changes: 10 additions & 10 deletions Tasks/JavaToolInstallerV0/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/JavaToolInstallerV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 165,
"Minor": 167,
"Patch": 0
},
"satisfies": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/JavaToolInstallerV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 165,
"Minor": 167,
"Patch": 0
},
"satisfies": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/JenkinsQueueJobV2/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import os = require('os');
import process = require('process');
import fs = require('fs');

import * as ttm from 'vsts-task-lib/mock-test';
import * as ttm from 'azure-pipelines-task-lib/mock-test';

describe('JenkinsQueueJob L0 Suite', function () {
this.timeout(parseInt(process.env.TASK_TEST_TIMEOUT) || 20000);
Expand Down
4 changes: 2 additions & 2 deletions Tasks/JenkinsQueueJobV2/Tests/L0BogusUrlNoParameters.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ma = require('vsts-task-lib/mock-answer');
import tmrm = require('vsts-task-lib/mock-run');
import ma = require('azure-pipelines-task-lib/mock-answer');
import tmrm = require('azure-pipelines-task-lib/mock-run');
import path = require('path');

const taskPath = path.join(__dirname, '..', 'jenkinsqueuejobtask.js');
Expand Down
4 changes: 2 additions & 2 deletions Tasks/JenkinsQueueJobV2/Tests/L0BogusUrlParameters.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ma = require('vsts-task-lib/mock-answer');
import tmrm = require('vsts-task-lib/mock-run');
import ma = require('azure-pipelines-task-lib/mock-answer');
import tmrm = require('azure-pipelines-task-lib/mock-run');
import path = require('path');

const taskPath = path.join(__dirname, '..', 'jenkinsqueuejobtask.js');
Expand Down
4 changes: 2 additions & 2 deletions Tasks/JenkinsQueueJobV2/Tests/L0NoCaptureConsole.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ma = require('vsts-task-lib/mock-answer');
import tmrm = require('vsts-task-lib/mock-run');
import ma = require('azure-pipelines-task-lib/mock-answer');
import tmrm = require('azure-pipelines-task-lib/mock-run');
import path = require('path');

const taskPath = path.join(__dirname, '..', 'jenkinsqueuejobtask.js');
Expand Down
4 changes: 2 additions & 2 deletions Tasks/JenkinsQueueJobV2/Tests/L0NoCapturePipeline.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ma = require('vsts-task-lib/mock-answer');
import tmrm = require('vsts-task-lib/mock-run');
import ma = require('azure-pipelines-task-lib/mock-answer');
import tmrm = require('azure-pipelines-task-lib/mock-run');
import path = require('path');

const taskPath = path.join(__dirname, '..', 'jenkinsqueuejobtask.js');
Expand Down
4 changes: 2 additions & 2 deletions Tasks/JenkinsQueueJobV2/Tests/L0NoJobName.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ma = require('vsts-task-lib/mock-answer');
import tmrm = require('vsts-task-lib/mock-run');
import ma = require('azure-pipelines-task-lib/mock-answer');
import tmrm = require('azure-pipelines-task-lib/mock-run');
import path = require('path');

const taskPath = path.join(__dirname, '..', 'jenkinsqueuejobtask.js');
Expand Down
4 changes: 2 additions & 2 deletions Tasks/JenkinsQueueJobV2/Tests/L0NoParameterizedJob.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ma = require('vsts-task-lib/mock-answer');
import tmrm = require('vsts-task-lib/mock-run');
import ma = require('azure-pipelines-task-lib/mock-answer');
import tmrm = require('azure-pipelines-task-lib/mock-run');
import path = require('path');

const taskPath = path.join(__dirname, '..', 'jenkinsqueuejobtask.js');
Expand Down
4 changes: 2 additions & 2 deletions Tasks/JenkinsQueueJobV2/Tests/L0NoServerEndpoint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ma = require('vsts-task-lib/mock-answer');
import tmrm = require('vsts-task-lib/mock-run');
import ma = require('azure-pipelines-task-lib/mock-answer');
import tmrm = require('azure-pipelines-task-lib/mock-run');
import path = require('path');

const taskPath = path.join(__dirname, '..', 'jenkinsqueuejobtask.js');
Expand Down
103 changes: 22 additions & 81 deletions Tasks/JenkinsQueueJobV2/Tests/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/JenkinsQueueJobV2/Tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vsts-tasks-jenkinsqueuejob",
"devDependencies": {
"@types/mocha": "^5.2.0",
"vsts-task-lib": "0.9.20"
"azure-pipelines-task-lib": "2.9.3"
},
"description": "Azure Pipelines Jenkins Queue Job Task",
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions Tasks/JenkinsQueueJobV2/jenkinsqueuejobtask.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

import tl = require('vsts-task-lib/task');
import tl = require('azure-pipelines-task-lib/task');
import fs = require('fs');
import path = require('path');
import shell = require('shelljs');
import Q = require('q');
import os = require('os');
import util = require('./util');

import { Job } from './job';
Expand Down Expand Up @@ -116,7 +117,7 @@ async function doWork() {
tl.setVariable('JENKINS_JOB_ID', rootJob.ExecutableNumber.toString());
} catch (e) {
tl.debug(e.message);
tl._writeError(e);
process.stderr.write(e + os.EOL);
tl.setResult(tl.TaskResult.Failed, e.message);
}
}
Expand Down
9 changes: 5 additions & 4 deletions Tasks/JenkinsQueueJobV2/job.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

import tl = require('vsts-task-lib/task');
import tl = require('azure-pipelines-task-lib/task');
import fs = require('fs');
import os = require('os');
import path = require('path');
import url = require('url');
import request = require('request');
Expand Down Expand Up @@ -373,15 +374,15 @@ export class Job {
} catch (e) {
tl.warning('unable to extract results file');
tl.debug(e.message);
tl._writeError(e);
process.stderr.write(e + os.EOL);
thisJob.stopWork(0, JobState.Done);
}
});
} catch (err) {
// don't fail the job if the results can not be downloaded successfully
tl.warning('unable to download results to file: ' + fileName + ' for Jenkins Job: ' + thisJob.ExecutableUrl);
tl.warning(err.message);
tl._writeError(err);
process.stderr.write(err + os.EOL);
thisJob.stopWork(0, JobState.Done);
}
} else { // an unexepected error with results
Expand All @@ -400,7 +401,7 @@ export class Job {
} catch (err) {
// don't fail the job if the results can not be downloaded successfully
tl.warning(err.message);
tl._writeError(err);
process.stderr.write(err + os.EOL);
thisJob.stopWork(0, JobState.Done);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tasks/JenkinsQueueJobV2/jobqueue.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

import tl = require('vsts-task-lib/task');
import tl = require('azure-pipelines-task-lib/task');
import fs = require('fs');
import path = require('path');
import shell = require('shelljs');
Expand Down
2 changes: 1 addition & 1 deletion Tasks/JenkinsQueueJobV2/jobsearch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

import tl = require('vsts-task-lib/task');
import tl = require('azure-pipelines-task-lib/task');
import Q = require('q');
import request = require('request');

Expand Down
Loading