From d68da0c238ac8f551f73a84b598c4d3c27d46fd8 Mon Sep 17 00:00:00 2001 From: Lucas Killgore Date: Mon, 9 Mar 2020 11:30:47 -0400 Subject: [PATCH 1/3] Updated azure-pipelines-task-lib version --- Tasks/XamarinTestCloudV1/package-lock.json | 92 +++++--------------- Tasks/XamarinTestCloudV1/package.json | 2 +- Tasks/XamarinTestCloudV1/task.json | 4 +- Tasks/XamarinTestCloudV1/task.loc.json | 4 +- Tasks/XamarinTestCloudV1/xamarintestcloud.ts | 20 ++--- Tasks/XamariniOSV2/package-lock.json | 31 +++++-- Tasks/XamariniOSV2/task.json | 2 +- Tasks/XamariniOSV2/task.loc.json | 2 +- 8 files changed, 59 insertions(+), 98 deletions(-) diff --git a/Tasks/XamarinTestCloudV1/package-lock.json b/Tasks/XamarinTestCloudV1/package-lock.json index 42df85b8602b..b1a1e64a40ad 100644 --- a/Tasks/XamarinTestCloudV1/package-lock.json +++ b/Tasks/XamarinTestCloudV1/package-lock.json @@ -4,6 +4,26 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "azure-pipelines-task-lib": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-2.9.3.tgz", + "integrity": "sha512-SPWKSfgmjyBDVIMzXnnPH0Gv7YXZ+AQ3SyIhNNALAmQpOltqJhgslvzrOClR5rKuoOyJlG0AWZILbZIXCkztAA==", + "requires": { + "minimatch": "3.0.4", + "mockery": "^1.7.0", + "q": "^1.1.2", + "semver": "^5.1.0", + "shelljs": "^0.3.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -23,32 +43,6 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -62,24 +56,6 @@ "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", "integrity": "sha1-9O3g2HUMHJcnwnLqLGBiniyaHE8=" }, - "node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -94,34 +70,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=" - }, - "vso-node-api": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/vso-node-api/-/vso-node-api-0.6.1.tgz", - "integrity": "sha1-nT3Qao2uL/NoKvjyioRXOaC9ZIE=", - "requires": { - "q": "^1.0.1" - } - }, - "vsts-task-lib": { - "version": "0.9.20", - "resolved": "https://registry.npmjs.org/vsts-task-lib/-/vsts-task-lib-0.9.20.tgz", - "integrity": "sha1-MbFJAXkbOyFytAiZDF4bzop57Zs=", - "requires": { - "glob": "^6.0.1", - "minimatch": "^3.0.0", - "mockery": "^1.7.0", - "node-uuid": "^1.4.7", - "q": "^1.1.2", - "semver": "^5.1.0", - "shelljs": "^0.3.0", - "vso-node-api": "^0.6.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } } diff --git a/Tasks/XamarinTestCloudV1/package.json b/Tasks/XamarinTestCloudV1/package.json index 912470cadbb3..1c93b4098b5b 100644 --- a/Tasks/XamarinTestCloudV1/package.json +++ b/Tasks/XamarinTestCloudV1/package.json @@ -17,6 +17,6 @@ }, "homepage": "https://github.com/Microsoft/azure-pipelines-tasks#readme", "dependencies": { - "vsts-task-lib": "^0.9.20" + "azure-pipelines-task-lib": "^2.9.3" } } diff --git a/Tasks/XamarinTestCloudV1/task.json b/Tasks/XamarinTestCloudV1/task.json index 7ff3e3ca0346..31cb424f426c 100644 --- a/Tasks/XamarinTestCloudV1/task.json +++ b/Tasks/XamarinTestCloudV1/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 1, - "Minor": 151, - "Patch": 1 + "Minor": 167, + "Patch": 0 }, "demands": [], "minimumAgentVersion": "1.83.0", diff --git a/Tasks/XamarinTestCloudV1/task.loc.json b/Tasks/XamarinTestCloudV1/task.loc.json index 0972d4e5800d..253677fa9f18 100644 --- a/Tasks/XamarinTestCloudV1/task.loc.json +++ b/Tasks/XamarinTestCloudV1/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 1, - "Minor": 151, - "Patch": 1 + "Minor": 167, + "Patch": 0 }, "demands": [], "minimumAgentVersion": "1.83.0", diff --git a/Tasks/XamarinTestCloudV1/xamarintestcloud.ts b/Tasks/XamarinTestCloudV1/xamarintestcloud.ts index 5add3feab3da..410842c6aaf4 100644 --- a/Tasks/XamarinTestCloudV1/xamarintestcloud.ts +++ b/Tasks/XamarinTestCloudV1/xamarintestcloud.ts @@ -1,10 +1,7 @@ -/// -/// - -import fs = require('fs'); +import fs = require('fs'); import path = require('path'); import os = require('os'); -import tl = require('vsts-task-lib/task'); +import tl = require('azure-pipelines-task-lib/task'); var isWin = /^win/.test(process.platform); @@ -26,7 +23,10 @@ var publishNUnitResults = tl.getInput('publishNUnitResults', false); // Define error handler var onError = function (errorMsg) { tl.error(errorMsg); - tl.exit(1); + + // This code came from here: https://github.com/microsoft/azure-pipelines-task-lib/blob/releases/0.7/node/lib/task.ts 'exit(1)' + tl.setResult(tl.TaskResult.Failed, tl.loc('LIB_ReturnCode', 1)); + process.exit(0); } function findFiles(pattern: string) : string [] { @@ -66,7 +66,7 @@ function findFiles(pattern: string) : string [] { // Find files matching the specified pattern tl.debug('Matching glob pattern: ' + pattern); - filesList = tl.match(allFiles, pattern, matchOptions); + filesList = tl.match(allFiles, pattern, null, matchOptions); } return filesList; } @@ -179,10 +179,10 @@ function publishTestResults() { if (publishNUnitResults == 'true') { var allFiles = tl.find(testDir); - var matchingTestResultsFiles = tl.match(allFiles, 'xamarintest_' + buildId + '*.xml', {matchBase: true}); + var matchingTestResultsFiles = tl.match(allFiles, 'xamarintest_' + buildId + '*.xml', null, {matchBase: true}) || []; var tp = new tl.TestPublisher("NUnit"); - tp.publish(matchingTestResultsFiles, false, "", "", "", ""); + tp.publish(matchingTestResultsFiles.toString(), "", "", "", "", ""); } } @@ -233,7 +233,7 @@ var submitToTestCloud = function (index) { var ipaFolder = path.dirname(path.dirname(appFiles[index])); tl.debug('Checking for dSYM files under: ' + ipaFolder); var alldsymFiles = tl.find(ipaFolder); - var dsymFiles = tl.match(alldsymFiles, dsym, {matchBase: true}); + var dsymFiles = tl.match(alldsymFiles, dsym, null, {matchBase: true}); if (!dsymFiles || dsymFiles.length == 0) { tl.warning('No matching dSYM files were found with pattern: ' + dsym); diff --git a/Tasks/XamariniOSV2/package-lock.json b/Tasks/XamariniOSV2/package-lock.json index cecb8cf4e6cc..1010daf5c1d8 100644 --- a/Tasks/XamariniOSV2/package-lock.json +++ b/Tasks/XamariniOSV2/package-lock.json @@ -28,9 +28,9 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -66,9 +66,9 @@ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "shelljs": { "version": "0.3.0", @@ -76,9 +76,22 @@ "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=" }, "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "vsts-task-lib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/vsts-task-lib/-/vsts-task-lib-2.7.0.tgz", + "integrity": "sha512-zQqgneIZG3VY84RoIzkQr07r9fDH3lPpj6Qp07K89co/vyFznWJYpkjcdxubQm1YvgNu/P0yWYLdDruHyGGdtA==", + "requires": { + "minimatch": "3.0.4", + "mockery": "^1.7.0", + "q": "^1.1.2", + "semver": "^5.1.0", + "shelljs": "^0.3.0", + "uuid": "^3.0.1" + } } } } \ No newline at end of file diff --git a/Tasks/XamariniOSV2/task.json b/Tasks/XamariniOSV2/task.json index 6f9685353fa4..b5c64533443a 100644 --- a/Tasks/XamariniOSV2/task.json +++ b/Tasks/XamariniOSV2/task.json @@ -12,7 +12,7 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 166, + "Minor": 167, "Patch": 0 }, "releaseNotes": "iOS signing set up has been removed from the task. Use `Secure Files` with supporting tasks `Install Apple Certificate` and `Install Apple Provisioning Profile` to setup signing. Updated options to work better with `Visual Studio for Mac`.", diff --git a/Tasks/XamariniOSV2/task.loc.json b/Tasks/XamariniOSV2/task.loc.json index dd1dc6d77f0e..fd92eafa2e8f 100644 --- a/Tasks/XamariniOSV2/task.loc.json +++ b/Tasks/XamariniOSV2/task.loc.json @@ -12,7 +12,7 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 166, + "Minor": 167, "Patch": 0 }, "releaseNotes": "ms-resource:loc.releaseNotes", From 9906ba6f01eded23a0e5ba8b0a6dbfcdf9e1e7f0 Mon Sep 17 00:00:00 2001 From: Lucas Killgore Date: Mon, 9 Mar 2020 13:21:13 -0400 Subject: [PATCH 2/3] Used minimatch --- Tasks/XamarinTestCloudV1/package.json | 3 ++- Tasks/XamarinTestCloudV1/xamarintestcloud.ts | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Tasks/XamarinTestCloudV1/package.json b/Tasks/XamarinTestCloudV1/package.json index 1c93b4098b5b..007c67473654 100644 --- a/Tasks/XamarinTestCloudV1/package.json +++ b/Tasks/XamarinTestCloudV1/package.json @@ -17,6 +17,7 @@ }, "homepage": "https://github.com/Microsoft/azure-pipelines-tasks#readme", "dependencies": { - "azure-pipelines-task-lib": "^2.9.3" + "azure-pipelines-task-lib": "^2.9.3", + "minimatch": "^3.0.4" } } diff --git a/Tasks/XamarinTestCloudV1/xamarintestcloud.ts b/Tasks/XamarinTestCloudV1/xamarintestcloud.ts index 410842c6aaf4..1b0d73d3b87f 100644 --- a/Tasks/XamarinTestCloudV1/xamarintestcloud.ts +++ b/Tasks/XamarinTestCloudV1/xamarintestcloud.ts @@ -1,6 +1,7 @@ import fs = require('fs'); import path = require('path'); import os = require('os'); +import minimatch = require('minimatch'); import tl = require('azure-pipelines-task-lib/task'); var isWin = /^win/.test(process.platform); @@ -66,7 +67,7 @@ function findFiles(pattern: string) : string [] { // Find files matching the specified pattern tl.debug('Matching glob pattern: ' + pattern); - filesList = tl.match(allFiles, pattern, null, matchOptions); + filesList = minimatch.match(allFiles, pattern, matchOptions); } return filesList; } @@ -179,7 +180,7 @@ function publishTestResults() { if (publishNUnitResults == 'true') { var allFiles = tl.find(testDir); - var matchingTestResultsFiles = tl.match(allFiles, 'xamarintest_' + buildId + '*.xml', null, {matchBase: true}) || []; + var matchingTestResultsFiles = minimatch.match(allFiles, 'xamarintest_' + buildId + '*.xml', {matchBase: true}) || []; var tp = new tl.TestPublisher("NUnit"); tp.publish(matchingTestResultsFiles.toString(), "", "", "", "", ""); @@ -233,7 +234,7 @@ var submitToTestCloud = function (index) { var ipaFolder = path.dirname(path.dirname(appFiles[index])); tl.debug('Checking for dSYM files under: ' + ipaFolder); var alldsymFiles = tl.find(ipaFolder); - var dsymFiles = tl.match(alldsymFiles, dsym, null, {matchBase: true}); + var dsymFiles = minimatch.match(alldsymFiles, dsym, {matchBase: true}); if (!dsymFiles || dsymFiles.length == 0) { tl.warning('No matching dSYM files were found with pattern: ' + dsym); From 3dc20ee51555f892ad4450fe4eab7d0af52b9bac Mon Sep 17 00:00:00 2001 From: Lucas Killgore Date: Mon, 9 Mar 2020 13:22:50 -0400 Subject: [PATCH 3/3] Increased timeouts --- Tasks/XamariniOSV2/Tests/L0.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tasks/XamariniOSV2/Tests/L0.ts b/Tasks/XamariniOSV2/Tests/L0.ts index de2682e1766a..2bd47001b870 100644 --- a/Tasks/XamariniOSV2/Tests/L0.ts +++ b/Tasks/XamariniOSV2/Tests/L0.ts @@ -15,7 +15,7 @@ describe('XamariniOS L0 Suite', function () { }); it('run XamariniOSV2 with all default inputs', function (done: MochaDone) { - this.timeout(1000); + this.timeout(3000); const tp = path.join(__dirname, 'L0DefaultInputs.js'); const tr = new ttm.MockTestRunner(tp); @@ -32,7 +32,7 @@ describe('XamariniOS L0 Suite', function () { }); it('XamariniOS signing with identifiers', function (done: MochaDone) { - this.timeout(1000); + this.timeout(2000); const tp = path.join(__dirname, 'L0SignWithIds.js'); const tr = new ttm.MockTestRunner(tp); @@ -49,7 +49,7 @@ describe('XamariniOS L0 Suite', function () { }); it('XamariniOS skip nuget restore', function (done: MochaDone) { - this.timeout(1000); + this.timeout(2000); const tp = path.join(__dirname, 'L0SkipNugetRestore.js'); const tr = new ttm.MockTestRunner(tp); @@ -66,7 +66,7 @@ describe('XamariniOS L0 Suite', function () { }); it('XamariniOS clean build', function (done: MochaDone) { - this.timeout(1000); + this.timeout(2000); const tp = path.join(__dirname, 'L0CleanBuild.js'); const tr = new ttm.MockTestRunner(tp);