From a9e45efe1eb88791c0619361d70d92ad9449e795 Mon Sep 17 00:00:00 2001 From: Puneet Agarwal Date: Mon, 1 Oct 2018 14:56:20 +0530 Subject: [PATCH 1/7] Update make.json --- Tasks/PublishTestResultsV2/make.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tasks/PublishTestResultsV2/make.json b/Tasks/PublishTestResultsV2/make.json index 35e759ba2ba7..395e8fdf628b 100644 --- a/Tasks/PublishTestResultsV2/make.json +++ b/Tasks/PublishTestResultsV2/make.json @@ -2,9 +2,9 @@ "externals": { "archivePackages": [ { - "url": "https://publishtestresults.blob.core.windows.net/publishtestresults/7274955/PublishTestResults.zip", + "url": "https://publishtestresults.blob.core.windows.net/publishtestresults/7340655/PublishTestResults.zip", "dest": "./" } ] } -} \ No newline at end of file +} From 891723eb5b922af48749d82e51c7ac208e8029d9 Mon Sep 17 00:00:00 2001 From: Puneet Agarwal Date: Mon, 1 Oct 2018 14:58:50 +0530 Subject: [PATCH 2/7] Update task.json --- Tasks/PublishTestResultsV2/task.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tasks/PublishTestResultsV2/task.json b/Tasks/PublishTestResultsV2/task.json index be215d3167fc..9f3bea1c67e3 100644 --- a/Tasks/PublishTestResultsV2/task.json +++ b/Tasks/PublishTestResultsV2/task.json @@ -13,7 +13,7 @@ "version": { "Major": 2, "Minor": 0, - "Patch": 11 + "Patch": 12 }, "demands": [], "releaseNotes": "", @@ -124,4 +124,4 @@ "NoMatchingFilesFound": "No test result files matching '%s' were found.", "ErrorTestResultsPublisher": "Error while executing TestResultsPublisher: %s." } -} \ No newline at end of file +} From 71b2a53507a430bd47b469a574f06920ec6551aa Mon Sep 17 00:00:00 2001 From: Puneet Agarwal Date: Mon, 1 Oct 2018 14:59:09 +0530 Subject: [PATCH 3/7] Update task.loc.json --- Tasks/PublishTestResultsV2/task.loc.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tasks/PublishTestResultsV2/task.loc.json b/Tasks/PublishTestResultsV2/task.loc.json index a8a9ace9194a..bfbfbb30849e 100644 --- a/Tasks/PublishTestResultsV2/task.loc.json +++ b/Tasks/PublishTestResultsV2/task.loc.json @@ -13,7 +13,7 @@ "version": { "Major": 2, "Minor": 0, - "Patch": 11 + "Patch": 12 }, "demands": [], "releaseNotes": "ms-resource:loc.releaseNotes", @@ -115,4 +115,4 @@ "NoMatchingFilesFound": "ms-resource:loc.messages.NoMatchingFilesFound", "ErrorTestResultsPublisher": "ms-resource:loc.messages.ErrorTestResultsPublisher" } -} \ No newline at end of file +} From 6b555fbcfb18aa9c5c92523868679f7278dc5110 Mon Sep 17 00:00:00 2001 From: Salvador Melendez-Delgado Date: Tue, 2 Oct 2018 10:08:19 -0700 Subject: [PATCH 4/7] Update VstsNuGetPush.exe in NuGet task for TLS 1.2 --- Tasks/NuGetCommandV2/Common/VstsNuGetPushToolUtilities.ts | 2 +- Tasks/NuGetCommandV2/make.json | 4 ++++ Tasks/NuGetCommandV2/package-lock.json | 2 +- Tasks/NuGetCommandV2/package.json | 2 +- Tasks/NuGetCommandV2/task.json | 2 +- Tasks/NuGetCommandV2/task.loc.json | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Tasks/NuGetCommandV2/Common/VstsNuGetPushToolUtilities.ts b/Tasks/NuGetCommandV2/Common/VstsNuGetPushToolUtilities.ts index b1165b976d9b..2875a409e3e3 100644 --- a/Tasks/NuGetCommandV2/Common/VstsNuGetPushToolUtilities.ts +++ b/Tasks/NuGetCommandV2/Common/VstsNuGetPushToolUtilities.ts @@ -3,7 +3,7 @@ import * as path from "path"; import * as commandHelper from "nuget-task-common/CommandHelper"; export function getBundledVstsNuGetPushLocation(): string { - const vstsNuGetPushPaths: string[] = ["VstsNuGetPush/0.13.0"]; + const vstsNuGetPushPaths: string[] = ["VstsNuGetPush/0.17.0"]; const toolPath = commandHelper.locateTool("VstsNuGetPush", { diff --git a/Tasks/NuGetCommandV2/make.json b/Tasks/NuGetCommandV2/make.json index 78e34bb106d3..8d6a057049fe 100644 --- a/Tasks/NuGetCommandV2/make.json +++ b/Tasks/NuGetCommandV2/make.json @@ -27,6 +27,10 @@ ], "externals": { "archivePackages": [ + { + "url": "https://vstsagenttools.blob.core.windows.net/tools/VstsNuGetPush/0.17.0/microsoft.visualstudio.services.packaging.nuget.pushtool.0.17.0.zip", + "dest": "./VstsNuGetPush/0.17.0/" + }, { "url": "https://vstsagenttools.blob.core.windows.net/tools/VstsNuGetPush/0.13.0/microsoft.visualstudio.services.packaging.nuget.pushtool.0.13.0.zip", "dest": "./VstsNuGetPush/0.13.0/" diff --git a/Tasks/NuGetCommandV2/package-lock.json b/Tasks/NuGetCommandV2/package-lock.json index 4e568cfb6953..498eca932166 100644 --- a/Tasks/NuGetCommandV2/package-lock.json +++ b/Tasks/NuGetCommandV2/package-lock.json @@ -1,6 +1,6 @@ { "name": "nugetcommand", - "version": "2.0.36", + "version": "2.0.44", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/Tasks/NuGetCommandV2/package.json b/Tasks/NuGetCommandV2/package.json index 57f0d1c57002..a3b336f7c176 100644 --- a/Tasks/NuGetCommandV2/package.json +++ b/Tasks/NuGetCommandV2/package.json @@ -1,6 +1,6 @@ { "name": "nugetcommand", - "version": "2.0.41", + "version": "2.0.44", "description": "Restore, pack, or push NuGet packages, or run a NuGet command.", "main": "nugetcommandmain.js", "scripts": { diff --git a/Tasks/NuGetCommandV2/task.json b/Tasks/NuGetCommandV2/task.json index 6a6cb863ef0e..879faae25306 100644 --- a/Tasks/NuGetCommandV2/task.json +++ b/Tasks/NuGetCommandV2/task.json @@ -9,7 +9,7 @@ "version": { "Major": 2, "Minor": 0, - "Patch": 41 + "Patch": 44 }, "runsOn": [ "Agent", diff --git a/Tasks/NuGetCommandV2/task.loc.json b/Tasks/NuGetCommandV2/task.loc.json index baaccbc95c20..bcea3cb77633 100644 --- a/Tasks/NuGetCommandV2/task.loc.json +++ b/Tasks/NuGetCommandV2/task.loc.json @@ -9,7 +9,7 @@ "version": { "Major": 2, "Minor": 0, - "Patch": 40 + "Patch": 44 }, "runsOn": [ "Agent", From 2a46fe6dd5cf895726bd8bb584bd097944afd1df Mon Sep 17 00:00:00 2001 From: Salvador Melendez-Delgado Date: Tue, 2 Oct 2018 15:06:07 -0700 Subject: [PATCH 5/7] Fixing wrong path for version 0.17.0 of VstsNuGetPush.exe --- Tasks/NuGetCommandV2/Common/VstsNuGetPushToolUtilities.ts | 2 +- Tasks/NuGetCommandV2/package-lock.json | 2 +- Tasks/NuGetCommandV2/package.json | 2 +- Tasks/NuGetCommandV2/task.json | 2 +- Tasks/NuGetCommandV2/task.loc.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Tasks/NuGetCommandV2/Common/VstsNuGetPushToolUtilities.ts b/Tasks/NuGetCommandV2/Common/VstsNuGetPushToolUtilities.ts index 2875a409e3e3..086cfe1eeb27 100644 --- a/Tasks/NuGetCommandV2/Common/VstsNuGetPushToolUtilities.ts +++ b/Tasks/NuGetCommandV2/Common/VstsNuGetPushToolUtilities.ts @@ -3,7 +3,7 @@ import * as path from "path"; import * as commandHelper from "nuget-task-common/CommandHelper"; export function getBundledVstsNuGetPushLocation(): string { - const vstsNuGetPushPaths: string[] = ["VstsNuGetPush/0.17.0"]; + const vstsNuGetPushPaths: string[] = ["VstsNuGetPush/0.17.0/tools"]; const toolPath = commandHelper.locateTool("VstsNuGetPush", { diff --git a/Tasks/NuGetCommandV2/package-lock.json b/Tasks/NuGetCommandV2/package-lock.json index 498eca932166..d9f8b6da5afe 100644 --- a/Tasks/NuGetCommandV2/package-lock.json +++ b/Tasks/NuGetCommandV2/package-lock.json @@ -1,6 +1,6 @@ { "name": "nugetcommand", - "version": "2.0.44", + "version": "2.0.45", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/Tasks/NuGetCommandV2/package.json b/Tasks/NuGetCommandV2/package.json index a3b336f7c176..5a096ad1d6f7 100644 --- a/Tasks/NuGetCommandV2/package.json +++ b/Tasks/NuGetCommandV2/package.json @@ -1,6 +1,6 @@ { "name": "nugetcommand", - "version": "2.0.44", + "version": "2.0.45", "description": "Restore, pack, or push NuGet packages, or run a NuGet command.", "main": "nugetcommandmain.js", "scripts": { diff --git a/Tasks/NuGetCommandV2/task.json b/Tasks/NuGetCommandV2/task.json index 879faae25306..2bf16ba8a23c 100644 --- a/Tasks/NuGetCommandV2/task.json +++ b/Tasks/NuGetCommandV2/task.json @@ -9,7 +9,7 @@ "version": { "Major": 2, "Minor": 0, - "Patch": 44 + "Patch": 45 }, "runsOn": [ "Agent", diff --git a/Tasks/NuGetCommandV2/task.loc.json b/Tasks/NuGetCommandV2/task.loc.json index bcea3cb77633..afa7dade06fd 100644 --- a/Tasks/NuGetCommandV2/task.loc.json +++ b/Tasks/NuGetCommandV2/task.loc.json @@ -9,7 +9,7 @@ "version": { "Major": 2, "Minor": 0, - "Patch": 44 + "Patch": 45 }, "runsOn": [ "Agent", From 05de7799d51f5ccc34d9972693944c73323b3f2d Mon Sep 17 00:00:00 2001 From: Bishal Prasad Date: Fri, 5 Oct 2018 12:01:37 +0530 Subject: [PATCH 6/7] Enable PackerBuildV1 task in M141 (#8498) --- Tasks/PackerBuildV0/Tests/L0.ts | 17 +++++++++++++++ Tasks/PackerBuildV1/Tests/L0.ts | 19 ++++++++++++++++- Tasks/PackerBuildV1/task.loc.json | 35 +++++++++++++++++-------------- make-options.json | 1 + 4 files changed, 55 insertions(+), 17 deletions(-) diff --git a/Tasks/PackerBuildV0/Tests/L0.ts b/Tasks/PackerBuildV0/Tests/L0.ts index 157eb59c517d..fcb02b63fe58 100644 --- a/Tasks/PackerBuildV0/Tests/L0.ts +++ b/Tasks/PackerBuildV0/Tests/L0.ts @@ -18,6 +18,23 @@ function runValidations(validator: () => void, tr, done) { describe('PackerBuild Suite', function() { this.timeout(30000); before((done) => { + + delete process.env["__build_output__"] ; + delete process.env["__copy_fails__"] ; + delete process.env["__deploy_package_found__"] ; + delete process.env["__dest_path_exists__"] ; + delete process.env["__download_fails__"] ; + delete process.env["__extract_fails__"] ; + delete process.env["__lower_version__"] ; + delete process.env["__no_output_vars__"] ; + delete process.env["__ostype__"] ; + delete process.env["__packer_build_fails__"] ; + delete process.env["__packer_build_no_output__"] ; + delete process.env["__packer_exists__"] ; + delete process.env["__packer_fix_fails__"] ; + delete process.env["__packer_validate_fails__"] ; + delete process.env["__spnObjectId_not_exists__"] ; + done(); }); after(function () { diff --git a/Tasks/PackerBuildV1/Tests/L0.ts b/Tasks/PackerBuildV1/Tests/L0.ts index 57d4d12637d8..19ec65b6b14b 100644 --- a/Tasks/PackerBuildV1/Tests/L0.ts +++ b/Tasks/PackerBuildV1/Tests/L0.ts @@ -15,9 +15,26 @@ function runValidations(validator: () => void, tr, done) { } } -describe('PackerBuild Suite', function() { +describe('PackerBuild Suite V1', function() { this.timeout(30000); before((done) => { + + delete process.env["__build_output__"] ; + delete process.env["__copy_fails__"] ; + delete process.env["__deploy_package_found__"] ; + delete process.env["__dest_path_exists__"] ; + delete process.env["__download_fails__"] ; + delete process.env["__extract_fails__"] ; + delete process.env["__lower_version__"] ; + delete process.env["__no_output_vars__"] ; + delete process.env["__ostype__"] ; + delete process.env["__packer_build_fails__"] ; + delete process.env["__packer_build_no_output__"] ; + delete process.env["__packer_exists__"] ; + delete process.env["__packer_fix_fails__"] ; + delete process.env["__packer_validate_fails__"] ; + delete process.env["__spnObjectId_not_exists__"] ; + done(); }); after(function () { diff --git a/Tasks/PackerBuildV1/task.loc.json b/Tasks/PackerBuildV1/task.loc.json index ebb58be1f8ea..30cf46e563e1 100644 --- a/Tasks/PackerBuildV1/task.loc.json +++ b/Tasks/PackerBuildV1/task.loc.json @@ -57,22 +57,6 @@ }, "defaultValue": "builtin" }, - { - "name": "isManagedImage", - "type": "boolean", - "label": "ms-resource:loc.input.label.isManagedImage", - "required": true, - "helpMarkDown": "ms-resource:loc.input.help.isManagedImage", - "defaultValue": true - }, - { - "name": "managedImageName", - "type": "string", - "label": "ms-resource:loc.input.label.managedImageName", - "required": true, - "helpMarkDown": "ms-resource:loc.input.help.managedImageName", - "visibleRule": "isManagedImage = true && templateType = builtin" - }, { "name": "customTemplateLocation", "type": "filePath", @@ -101,6 +85,24 @@ "helpMarkDown": "ms-resource:loc.input.help.ConnectedServiceName", "groupName": "AzureDetails" }, + { + "name": "isManagedImage", + "type": "boolean", + "label": "ms-resource:loc.input.label.isManagedImage", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.isManagedImage", + "defaultValue": true, + "groupName": "AzureDetails" + }, + { + "name": "managedImageName", + "type": "string", + "label": "ms-resource:loc.input.label.managedImageName", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.managedImageName", + "visibleRule": "isManagedImage = true", + "groupName": "AzureDetails" + }, { "name": "location", "type": "pickList", @@ -293,6 +295,7 @@ "PackerBuildCompleted": "ms-resource:loc.messages.PackerBuildCompleted", "ImageURIOutputVariableNotFound": "ms-resource:loc.messages.ImageURIOutputVariableNotFound", "ManagedImageNameOutputVariableNotFound": "ms-resource:loc.messages.ManagedImageNameOutputVariableNotFound", + "CustumTemplateOutputVariableNotFound": "ms-resource:loc.messages.CustumTemplateOutputVariableNotFound", "BuiltInTemplateNotFoundErrorMessagePathName": "ms-resource:loc.messages.BuiltInTemplateNotFoundErrorMessagePathName", "CustomTemplateNotFoundErrorMessagePathName": "ms-resource:loc.messages.CustomTemplateNotFoundErrorMessagePathName", "CouldNotDeleteTemporaryTemplateDirectory": "ms-resource:loc.messages.CouldNotDeleteTemporaryTemplateDirectory", diff --git a/make-options.json b/make-options.json index 65d185608b25..2913e6b53130 100644 --- a/make-options.json +++ b/make-options.json @@ -81,6 +81,7 @@ "NuGetPublisherV0", "NuGetToolInstallerV0", "PackerBuildV0", + "PackerBuildV1", "PowerShellV2", "PowerShellOnTargetMachinesV2", "PowerShellOnTargetMachinesV3", From 4f303288a9f5f08d86cd1f1e2703883f02b5d1a6 Mon Sep 17 00:00:00 2001 From: Bishal Prasad Date: Sun, 7 Oct 2018 10:03:56 +0530 Subject: [PATCH 7/7] Porting DotNetCoreInstaller fixes from master (#8497) * Cherry-pick commit 262934b172ba2a21e63adad3a9940806f94140b6: Prepend global tool path (#8432) # Conflicts: # Tasks/DotNetCoreInstallerV0/task.json # Tasks/DotNetCoreInstallerV0/task.loc.json * Cherry-pick commit cf3705fddaa8a4457fecbdb0247baa3afddd68ba: handle url in filename (#8487) * Handle filename being a url in release json * fix spacing * Better comment * cleanup --- .../resources.resjson/en-US/resources.resjson | 3 ++- .../dotnetcoreinstaller.ts | 15 +++++++++++++++ Tasks/DotNetCoreInstallerV0/releasesfetcher.ts | 18 +++++++++++++----- Tasks/DotNetCoreInstallerV0/task.json | 5 +++-- Tasks/DotNetCoreInstallerV0/task.loc.json | 5 +++-- 5 files changed, 36 insertions(+), 10 deletions(-) diff --git a/Tasks/DotNetCoreInstallerV0/Strings/resources.resjson/en-US/resources.resjson b/Tasks/DotNetCoreInstallerV0/Strings/resources.resjson/en-US/resources.resjson index cd56ed1b6626..a32ba24cb46d 100644 --- a/Tasks/DotNetCoreInstallerV0/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/DotNetCoreInstallerV0/Strings/resources.resjson/en-US/resources.resjson @@ -26,5 +26,6 @@ "loc.messages.LegacyPlatform": "Detected platform (Legacy): %s", "loc.messages.WarningVersionNotFound": "Could not fetch download information for version %s. Please check if the version specified is correct. You can refer the link for supported versions => https://github.com/dotnet/core/blob/master/release-notes/releases.json. Falling back to creating convention based URL.", "loc.messages.CouldNotDownload": "Could not download installation package from this URL: %s Error: %s", - "loc.messages.FailedToDownloadPackage": "Failed to download package for installation" + "loc.messages.FailedToDownloadPackage": "Failed to download package for installation", + "loc.messages.PrependGlobalToolPath": "Creating global tool path and pre-prending to PATH." } \ No newline at end of file diff --git a/Tasks/DotNetCoreInstallerV0/dotnetcoreinstaller.ts b/Tasks/DotNetCoreInstallerV0/dotnetcoreinstaller.ts index c1570bce39f2..1f176d6622a5 100644 --- a/Tasks/DotNetCoreInstallerV0/dotnetcoreinstaller.ts +++ b/Tasks/DotNetCoreInstallerV0/dotnetcoreinstaller.ts @@ -36,6 +36,21 @@ class DotnetCoreInstaller { // Prepend the tools path. instructs the agent to prepend for future tasks toolLib.prependPath(toolPath); + try { + let globalToolPath: string = ""; + if (tl.osType().match(/^Win/)) { + globalToolPath = path.join(process.env.USERPROFILE, ".dotnet\\tools"); + } else { + globalToolPath = path.join(process.env.HOME, ".dotnet/tools"); + } + + console.log(tl.loc("PrependGlobalToolPath")); + tl.mkdirP(globalToolPath); + toolLib.prependPath(globalToolPath); + } catch (error) { + //nop + } + // Set DOTNET_ROOT for dotnet core Apphost to find runtime since it is installed to a non well-known location. tl.setVariable('DOTNET_ROOT', toolPath); } diff --git a/Tasks/DotNetCoreInstallerV0/releasesfetcher.ts b/Tasks/DotNetCoreInstallerV0/releasesfetcher.ts index d974d69a6cb8..9b6c311f9a1f 100644 --- a/Tasks/DotNetCoreInstallerV0/releasesfetcher.ts +++ b/Tasks/DotNetCoreInstallerV0/releasesfetcher.ts @@ -29,14 +29,22 @@ export class DotNetCoreReleaseFetcher { let blobUrl: string = release['blob-' + type]; let dlcUrl: string = release['dlc-' + type]; let fileName: string = release[type + '-' + osSuffixes[0]] ? release[type + '-' + osSuffixes[0]] : release[type + '-' + osSuffixes[1]]; + fileName = fileName.trim(); if (!!fileName) { - if (!!blobUrl) { - downloadUrls.push(util.format("%s%s", blobUrl.trim(), fileName.trim())); - } + // For some latest version, the filename itself can be full download url. + // Do a very basic check for url(instead of regex) as the url is only for downloading and + // is coming from .net core releases json and not some ransom user input + if (fileName.toLowerCase().startsWith("https://")) { + downloadUrls.push(fileName); + } else { + if (!!blobUrl) { + downloadUrls.push(util.format("%s%s", blobUrl.trim(), fileName)); + } - if (!!dlcUrl) { - downloadUrls.push(util.format("%s%s", dlcUrl.trim(), fileName.trim())); + if (!!dlcUrl) { + downloadUrls.push(util.format("%s%s", dlcUrl.trim(), fileName)); + } } } } diff --git a/Tasks/DotNetCoreInstallerV0/task.json b/Tasks/DotNetCoreInstallerV0/task.json index c8f64ebf0d40..3bc998867a37 100644 --- a/Tasks/DotNetCoreInstallerV0/task.json +++ b/Tasks/DotNetCoreInstallerV0/task.json @@ -13,7 +13,7 @@ "version": { "Major": 0, "Minor": 1, - "Patch": 13 + "Patch": 16 }, "satisfies": [ "DotNetCore" @@ -67,6 +67,7 @@ "LegacyPlatform": "Detected platform (Legacy): %s", "WarningVersionNotFound": "Could not fetch download information for version %s. Please check if the version specified is correct. You can refer the link for supported versions => https://github.com/dotnet/core/blob/master/release-notes/releases.json. Falling back to creating convention based URL.", "CouldNotDownload": "Could not download installation package from this URL: %s Error: %s", - "FailedToDownloadPackage": "Failed to download package for installation" + "FailedToDownloadPackage": "Failed to download package for installation", + "PrependGlobalToolPath": "Creating global tool path and pre-prending to PATH." } } \ No newline at end of file diff --git a/Tasks/DotNetCoreInstallerV0/task.loc.json b/Tasks/DotNetCoreInstallerV0/task.loc.json index 6146faad8b96..7b49941cafc8 100644 --- a/Tasks/DotNetCoreInstallerV0/task.loc.json +++ b/Tasks/DotNetCoreInstallerV0/task.loc.json @@ -13,7 +13,7 @@ "version": { "Major": 0, "Minor": 1, - "Patch": 13 + "Patch": 16 }, "satisfies": [ "DotNetCore" @@ -67,6 +67,7 @@ "LegacyPlatform": "ms-resource:loc.messages.LegacyPlatform", "WarningVersionNotFound": "ms-resource:loc.messages.WarningVersionNotFound", "CouldNotDownload": "ms-resource:loc.messages.CouldNotDownload", - "FailedToDownloadPackage": "ms-resource:loc.messages.FailedToDownloadPackage" + "FailedToDownloadPackage": "ms-resource:loc.messages.FailedToDownloadPackage", + "PrependGlobalToolPath": "ms-resource:loc.messages.PrependGlobalToolPath" } } \ No newline at end of file