From 16000cb9436ab59ae11971611ff81df7fd542a71 Mon Sep 17 00:00:00 2001 From: Ondrej Netocny Date: Fri, 27 Oct 2023 11:20:57 +0200 Subject: [PATCH 1/2] Check msdeploy version --- .../resources.resjson/en-US/resources.resjson | 3 +- .../azurermwebappdeployment.ts | 21 ++++++------ .../package-lock.json | 28 ++++++++++++++-- Tasks/AzureRmWebAppDeploymentV3/package.json | 2 +- Tasks/AzureRmWebAppDeploymentV3/task.json | 5 +-- Tasks/AzureRmWebAppDeploymentV3/task.loc.json | 5 +-- .../_buildConfigs/Node16/package-lock.json | 28 ++++++++++++++-- .../_buildConfigs/Node16/package.json | 2 +- .../operations/WebDeployUtility.ts | 17 ++++++---- .../package-lock.json | 33 +++++++++++++++++-- Tasks/AzureRmWebAppDeploymentV4/package.json | 2 +- Tasks/AzureRmWebAppDeploymentV4/task.json | 5 +-- Tasks/AzureRmWebAppDeploymentV4/task.loc.json | 2 +- .../AzureRmWebAppDeploymentV4.versionmap.txt | 4 +-- .../resources.resjson/en-US/resources.resjson | 3 +- .../operations/WebDeployUtility.ts | 17 ++++++---- .../package-lock.json | 33 +++++++++++++++++-- .../AzureRmWebAppDeploymentV4/package.json | 2 +- .../AzureRmWebAppDeploymentV4/task.json | 9 ++--- .../AzureRmWebAppDeploymentV4/task.loc.json | 9 ++--- .../resources.resjson/en-US/resources.resjson | 3 +- .../operations/WebDeployUtility.ts | 17 ++++++---- .../package-lock.json | 28 ++++++++++++++-- .../package.json | 2 +- .../task.json | 9 ++--- .../task.loc.json | 9 ++--- 26 files changed, 219 insertions(+), 79 deletions(-) diff --git a/Tasks/AzureRmWebAppDeploymentV3/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureRmWebAppDeploymentV3/Strings/resources.resjson/en-US/resources.resjson index f7479d5ddd8d..5ee5fb5bff00 100644 --- a/Tasks/AzureRmWebAppDeploymentV3/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/AzureRmWebAppDeploymentV3/Strings/resources.resjson/en-US/resources.resjson @@ -223,5 +223,6 @@ "loc.messages.ASE_WebDeploySSLIssueRecommendation": "To use a certificate in App Service, the certificate must be signed by a trusted certificate authority. If your web app gives you certificate validation errors, you're probably using a self-signed certificate and to resolve them you need to pass -allowUntrusted in additional arguments of web deploy option.", "loc.messages.FailedToUpdateApplicationInsightsResource": "Failed to update Application Insights '%s' Resource. Error: %s", "loc.messages.JarNotSupported": "Jar deployment is not supported in this version. Change the task version to '4.*' which is in preview mode", - "loc.messages.CorrelationIdForARM": "Correlation ID from ARM api call response : %s" + "loc.messages.CorrelationIdForARM": "Correlation ID from ARM api call response : %s", + "loc.messages.MSDeployNotSupportTokenAuth": "App Service is configured to not use basic authentication. This requires Web Deploy msdeploy.exe version 7.1.7225 or higher. You need a version of Visual Studio that includes an updated version of msdeploy.exe. For more information, visit https://aka.ms/azdo-webapp-msdeploy ." } \ No newline at end of file diff --git a/Tasks/AzureRmWebAppDeploymentV3/azurermwebappdeployment.ts b/Tasks/AzureRmWebAppDeploymentV3/azurermwebappdeployment.ts index c8b74cb1c8a6..e288ee9e320a 100644 --- a/Tasks/AzureRmWebAppDeploymentV3/azurermwebappdeployment.ts +++ b/Tasks/AzureRmWebAppDeploymentV3/azurermwebappdeployment.ts @@ -20,7 +20,7 @@ import { addReleaseAnnotation } from './operations/ReleaseAnnotationUtility'; import { PackageUtility } from 'azure-pipelines-tasks-webdeployment-common/packageUtility'; import { isInputPkgIsFolder, canUseWebDeploy } from 'azure-pipelines-tasks-webdeployment-common/utility'; import { DeployUsingMSDeploy } from 'azure-pipelines-tasks-webdeployment-common/deployusingmsdeploy'; -import { shouldUseMSDeployTokenAuth} from 'azure-pipelines-tasks-webdeployment-common/msdeployutility'; +import { shouldUseMSDeployTokenAuth, installedMSDeployVersionSupportsTokenAuth} from 'azure-pipelines-tasks-webdeployment-common/msdeployutility'; async function main() { let zipDeploymentID: string; @@ -98,21 +98,22 @@ async function main() { var msDeployPublishingProfile = await appServiceUtility.getWebDeployPublishingProfile(); let authType = "Basic"; - if (await appServiceUtility.isSitePublishingCredentialsEnabled()) - { + if (await appServiceUtility.isSitePublishingCredentialsEnabled()) { tl.debug("Using Basic authentication.") } - else if (shouldUseMSDeployTokenAuth()) - { + else if (!shouldUseMSDeployTokenAuth()) { + //deployment would fail in this case + throw new Error(tl.loc("BasicAuthNotSupported")); + } + else if (await installedMSDeployVersionSupportsTokenAuth() === false) { + //deployment would fail in this case + throw new Error(tl.loc("MSDeployNotSupportTokenAuth")); + } + else { tl.debug("Basic authentication is disabled, using token based authentication."); authType = "Bearer"; msDeployPublishingProfile.userPWD = await appServiceUtility.getAuthToken(); msDeployPublishingProfile.userName = "user"; // arbitrary but not empty - } - else - { - //deployment would fail in this case - throw new Error(tl.loc("BasicAuthNotSupported")); } if (webPackage.toString().toLowerCase().endsWith('.war')) { diff --git a/Tasks/AzureRmWebAppDeploymentV3/package-lock.json b/Tasks/AzureRmWebAppDeploymentV3/package-lock.json index 95e3b829a4af..120b830c1aed 100644 --- a/Tasks/AzureRmWebAppDeploymentV3/package-lock.json +++ b/Tasks/AzureRmWebAppDeploymentV3/package-lock.json @@ -262,9 +262,9 @@ } }, "azure-pipelines-tasks-webdeployment-common": { - "version": "4.230.3", - "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-webdeployment-common/-/azure-pipelines-tasks-webdeployment-common-4.230.3.tgz", - "integrity": "sha512-Z8YVQZfwnit3iNwL+FhF9fTFObnzypQViUgX1Ms8Gtc6/+3+RCzpL9QAbsJ5Qkmy42kZjaAhCdNfrqIpS9ATAw==", + "version": "4.230.4", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-webdeployment-common/-/azure-pipelines-tasks-webdeployment-common-4.230.4.tgz", + "integrity": "sha512-1/bo0e7rajimESJdd6zsbLnQ8HqSavhgj5jBav7s0jnOWxFxocZGoKF/LkBLHWaDEiQ3ClyNTW5szbhijX1Tzw==", "requires": { "@types/ltx": "3.0.6", "@types/mocha": "^5.2.7", @@ -276,6 +276,7 @@ "ltx": "2.8.0", "node-stream-zip": "^1.15.0", "q": "1.4.1", + "semver": "^7.5.4", "winreg": "1.2.2", "xml2js": "0.6.2" }, @@ -285,6 +286,14 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, "xml2js": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", @@ -772,6 +781,14 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, "ltx": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.8.0.tgz", @@ -1175,6 +1192,11 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "zip-stream": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", diff --git a/Tasks/AzureRmWebAppDeploymentV3/package.json b/Tasks/AzureRmWebAppDeploymentV3/package.json index 5b75b8511b46..f6edfa53ac9e 100644 --- a/Tasks/AzureRmWebAppDeploymentV3/package.json +++ b/Tasks/AzureRmWebAppDeploymentV3/package.json @@ -24,7 +24,7 @@ "azure-pipelines-task-lib": "^4.4.0", "agent-base": "^6.0.2", "azure-pipelines-tasks-azure-arm-rest": "3.223.3", - "azure-pipelines-tasks-webdeployment-common": "4.230.3", + "azure-pipelines-tasks-webdeployment-common": "4.230.4", "decompress-zip": "^0.3.3", "ltx": "2.8.0", "moment": "^2.29.4", diff --git a/Tasks/AzureRmWebAppDeploymentV3/task.json b/Tasks/AzureRmWebAppDeploymentV3/task.json index f06ed3db62d7..6542fffcdf96 100644 --- a/Tasks/AzureRmWebAppDeploymentV3/task.json +++ b/Tasks/AzureRmWebAppDeploymentV3/task.json @@ -18,7 +18,7 @@ "version": { "Major": 3, "Minor": 230, - "Patch": 3 + "Patch": 4 }, "releaseNotes": "What's new in Version 3.0:
  Supports File Transformations (XDT)
  Supports Variable Substitutions(XML, JSON)
Click [here](https://aka.ms/azurermwebdeployreadme) for more information.", "minimumAgentVersion": "2.104.1", @@ -765,6 +765,7 @@ "ASE_WebDeploySSLIssueRecommendation": "To use a certificate in App Service, the certificate must be signed by a trusted certificate authority. If your web app gives you certificate validation errors, you're probably using a self-signed certificate and to resolve them you need to pass -allowUntrusted in additional arguments of web deploy option.", "FailedToUpdateApplicationInsightsResource": "Failed to update Application Insights '%s' Resource. Error: %s", "JarNotSupported": "Jar deployment is not supported in this version. Change the task version to '4.*' which is in preview mode", - "CorrelationIdForARM": "Correlation ID from ARM api call response : %s" + "CorrelationIdForARM": "Correlation ID from ARM api call response : %s", + "MSDeployNotSupportTokenAuth": "App Service is configured to not use basic authentication. This requires Web Deploy msdeploy.exe version 7.1.7225 or higher. You need a version of Visual Studio that includes an updated version of msdeploy.exe. For more information, visit https://aka.ms/azdo-webapp-msdeploy ." } } \ No newline at end of file diff --git a/Tasks/AzureRmWebAppDeploymentV3/task.loc.json b/Tasks/AzureRmWebAppDeploymentV3/task.loc.json index 4fc2b0325101..851e048aa931 100644 --- a/Tasks/AzureRmWebAppDeploymentV3/task.loc.json +++ b/Tasks/AzureRmWebAppDeploymentV3/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 3, "Minor": 230, - "Patch": 3 + "Patch": 4 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.104.1", @@ -765,6 +765,7 @@ "ASE_WebDeploySSLIssueRecommendation": "ms-resource:loc.messages.ASE_WebDeploySSLIssueRecommendation", "FailedToUpdateApplicationInsightsResource": "ms-resource:loc.messages.FailedToUpdateApplicationInsightsResource", "JarNotSupported": "ms-resource:loc.messages.JarNotSupported", - "CorrelationIdForARM": "ms-resource:loc.messages.CorrelationIdForARM" + "CorrelationIdForARM": "ms-resource:loc.messages.CorrelationIdForARM", + "MSDeployNotSupportTokenAuth": "ms-resource:loc.messages.MSDeployNotSupportTokenAuth" } } \ No newline at end of file diff --git a/Tasks/AzureRmWebAppDeploymentV4/_buildConfigs/Node16/package-lock.json b/Tasks/AzureRmWebAppDeploymentV4/_buildConfigs/Node16/package-lock.json index 902e6fbc6067..8c9bcbbe36b6 100644 --- a/Tasks/AzureRmWebAppDeploymentV4/_buildConfigs/Node16/package-lock.json +++ b/Tasks/AzureRmWebAppDeploymentV4/_buildConfigs/Node16/package-lock.json @@ -243,9 +243,9 @@ } }, "azure-pipelines-tasks-webdeployment-common": { - "version": "4.230.3", - "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-webdeployment-common/-/azure-pipelines-tasks-webdeployment-common-4.230.3.tgz", - "integrity": "sha512-Z8YVQZfwnit3iNwL+FhF9fTFObnzypQViUgX1Ms8Gtc6/+3+RCzpL9QAbsJ5Qkmy42kZjaAhCdNfrqIpS9ATAw==", + "version": "4.230.4", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-webdeployment-common/-/azure-pipelines-tasks-webdeployment-common-4.230.4.tgz", + "integrity": "sha512-1/bo0e7rajimESJdd6zsbLnQ8HqSavhgj5jBav7s0jnOWxFxocZGoKF/LkBLHWaDEiQ3ClyNTW5szbhijX1Tzw==", "requires": { "@types/ltx": "3.0.6", "@types/mocha": "^5.2.7", @@ -257,6 +257,7 @@ "ltx": "2.8.0", "node-stream-zip": "^1.15.0", "q": "1.4.1", + "semver": "^7.5.4", "winreg": "1.2.2", "xml2js": "0.6.2" }, @@ -266,6 +267,14 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, "xml2js": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", @@ -751,6 +760,14 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, "ltx": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.8.0.tgz", @@ -1147,6 +1164,11 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "zip-stream": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", diff --git a/Tasks/AzureRmWebAppDeploymentV4/_buildConfigs/Node16/package.json b/Tasks/AzureRmWebAppDeploymentV4/_buildConfigs/Node16/package.json index c64ffa3989d9..0b20f30449af 100644 --- a/Tasks/AzureRmWebAppDeploymentV4/_buildConfigs/Node16/package.json +++ b/Tasks/AzureRmWebAppDeploymentV4/_buildConfigs/Node16/package.json @@ -22,7 +22,7 @@ "@types/q": "1.0.7", "azure-pipelines-task-lib": "4.4.0", "azure-pipelines-tasks-azure-arm-rest": "3.223.5", - "azure-pipelines-tasks-webdeployment-common": "4.230.3", + "azure-pipelines-tasks-webdeployment-common": "4.230.4", "moment": "^2.29.4", "q": "1.4.1", "uuid": "3.1.0", diff --git a/Tasks/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts b/Tasks/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts index 24f9758e8e28..00dcbff4683c 100644 --- a/Tasks/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts +++ b/Tasks/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts @@ -1,11 +1,11 @@ import tl = require('azure-pipelines-task-lib/task'); -import { TaskParameters } from './TaskParameters'; -import { WebDeployArguments, WebDeployResult } from 'azure-pipelines-tasks-webdeployment-common/msdeployutility'; +import { WebDeployArguments, WebDeployResult, shouldUseMSDeployTokenAuth, installedMSDeployVersionSupportsTokenAuth } from 'azure-pipelines-tasks-webdeployment-common/msdeployutility'; import { executeWebDeploy } from 'azure-pipelines-tasks-webdeployment-common/deployusingmsdeploy'; import { copySetParamFileIfItExists } from 'azure-pipelines-tasks-webdeployment-common/utility'; + +import { TaskParameters } from './TaskParameters'; import { AzureAppServiceUtility } from './AzureAppServiceUtility'; -import { shouldUseMSDeployTokenAuth } from 'azure-pipelines-tasks-webdeployment-common/msdeployutility' const DEFAULT_RETRY_COUNT = 3; @@ -61,14 +61,17 @@ export class WebDeployUtility { webDeployArguments.userName = publishProfile.userName; webDeployArguments.password = publishProfile.userPWD; } - else if (shouldUseMSDeployTokenAuth()) { + else if (!shouldUseMSDeployTokenAuth()) { + throw new Error(tl.loc("BasicAuthNotSupported")); + } + else if (await installedMSDeployVersionSupportsTokenAuth() === false) { + throw new Error(tl.loc("MSDeployNotSupportTokenAuth")); + } + else { tl.debug("Basic authentication is disabled, using token based authentication."); webDeployArguments.authType = "Bearer"; webDeployArguments.password = await this._azureAppServiceUtility.getAuthToken(); webDeployArguments.userName = "user"; // arbitrary but not empty - } - else { - throw new Error(tl.loc("BasicAuthNotSupported")); } webDeployArguments.publishUrl = publishProfile.publishUrl; diff --git a/Tasks/AzureRmWebAppDeploymentV4/package-lock.json b/Tasks/AzureRmWebAppDeploymentV4/package-lock.json index 0ab402f16f3a..02c325f4b805 100644 --- a/Tasks/AzureRmWebAppDeploymentV4/package-lock.json +++ b/Tasks/AzureRmWebAppDeploymentV4/package-lock.json @@ -237,9 +237,9 @@ } }, "azure-pipelines-tasks-webdeployment-common": { - "version": "4.230.3", - "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-webdeployment-common/-/azure-pipelines-tasks-webdeployment-common-4.230.3.tgz", - "integrity": "sha512-Z8YVQZfwnit3iNwL+FhF9fTFObnzypQViUgX1Ms8Gtc6/+3+RCzpL9QAbsJ5Qkmy42kZjaAhCdNfrqIpS9ATAw==", + "version": "4.230.4", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-webdeployment-common/-/azure-pipelines-tasks-webdeployment-common-4.230.4.tgz", + "integrity": "sha512-1/bo0e7rajimESJdd6zsbLnQ8HqSavhgj5jBav7s0jnOWxFxocZGoKF/LkBLHWaDEiQ3ClyNTW5szbhijX1Tzw==", "requires": { "@types/ltx": "3.0.6", "@types/mocha": "^5.2.7", @@ -251,6 +251,7 @@ "ltx": "2.8.0", "node-stream-zip": "^1.15.0", "q": "1.4.1", + "semver": "^7.5.4", "winreg": "1.2.2", "xml2js": "0.6.2" }, @@ -275,9 +276,22 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==" + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" } } }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, "xml2js": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", @@ -783,6 +797,14 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, "ltx": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.8.0.tgz", @@ -1235,6 +1257,11 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "zip-stream": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", diff --git a/Tasks/AzureRmWebAppDeploymentV4/package.json b/Tasks/AzureRmWebAppDeploymentV4/package.json index 8d99289be16d..2e2f37460a84 100644 --- a/Tasks/AzureRmWebAppDeploymentV4/package.json +++ b/Tasks/AzureRmWebAppDeploymentV4/package.json @@ -22,7 +22,7 @@ "@types/q": "1.0.7", "azure-pipelines-task-lib": "^3.4.0", "azure-pipelines-tasks-azure-arm-rest": "3.223.5", - "azure-pipelines-tasks-webdeployment-common": "4.230.3", + "azure-pipelines-tasks-webdeployment-common": "4.230.4", "moment": "^2.29.4", "q": "1.4.1", "uuid": "3.1.0", diff --git a/Tasks/AzureRmWebAppDeploymentV4/task.json b/Tasks/AzureRmWebAppDeploymentV4/task.json index 17d29303fca6..4d5d014a7997 100644 --- a/Tasks/AzureRmWebAppDeploymentV4/task.json +++ b/Tasks/AzureRmWebAppDeploymentV4/task.json @@ -18,7 +18,7 @@ "version": { "Major": 4, "Minor": 230, - "Patch": 3 + "Patch": 5 }, "releaseNotes": "What's new in version 4.*
Supports Zip Deploy, Run From Package, War Deploy [Details here](https://aka.ms/appServiceDeploymentMethods)
Supports App Service Environments
Improved UI for discovering different App service types supported by the task
Run From Package is the preferred deployment method, which makes files in wwwroot folder read-only
Click [here](https://aka.ms/azurermwebdeployreadme) for more information.", "minimumAgentVersion": "2.104.1", @@ -651,6 +651,7 @@ "FailedToGetResourceID": "Failed to get resource ID for resource type '%s' and resource name '%s'. Error: %s", "JarPathNotPresent": "Java jar path is not present", "FailedToUpdateApplicationInsightsResource": "Failed to update Application Insights '%s' Resource. Error: %s", - "RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method." + "RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method.", + "MSDeployNotSupportTokenAuth": "App Service is configured to not use basic authentication. This requires Web Deploy msdeploy.exe version 7.1.7225 or higher. You need a version of Visual Studio that includes an updated version of msdeploy.exe. For more information, visit https://aka.ms/azdo-webapp-msdeploy ." } } \ No newline at end of file diff --git a/Tasks/AzureRmWebAppDeploymentV4/task.loc.json b/Tasks/AzureRmWebAppDeploymentV4/task.loc.json index 0e0778626b32..3fce91e0cd1a 100644 --- a/Tasks/AzureRmWebAppDeploymentV4/task.loc.json +++ b/Tasks/AzureRmWebAppDeploymentV4/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 4, "Minor": 230, - "Patch": 3 + "Patch": 5 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.104.1", diff --git a/_generated/AzureRmWebAppDeploymentV4.versionmap.txt b/_generated/AzureRmWebAppDeploymentV4.versionmap.txt index 2b8a6f5e6d60..23a3f82343b7 100644 --- a/_generated/AzureRmWebAppDeploymentV4.versionmap.txt +++ b/_generated/AzureRmWebAppDeploymentV4.versionmap.txt @@ -1,2 +1,2 @@ -Default|4.230.3 -Node16-225|4.230.4 +Default|4.230.5 +Node16-225|4.230.6 diff --git a/_generated/AzureRmWebAppDeploymentV4/Strings/resources.resjson/en-US/resources.resjson b/_generated/AzureRmWebAppDeploymentV4/Strings/resources.resjson/en-US/resources.resjson index 3a8e1b97db4b..dfb1c49dc866 100644 --- a/_generated/AzureRmWebAppDeploymentV4/Strings/resources.resjson/en-US/resources.resjson +++ b/_generated/AzureRmWebAppDeploymentV4/Strings/resources.resjson/en-US/resources.resjson @@ -225,5 +225,6 @@ "loc.messages.FailedToGetResourceID": "Failed to get resource ID for resource type '%s' and resource name '%s'. Error: %s", "loc.messages.JarPathNotPresent": "Java jar path is not present", "loc.messages.FailedToUpdateApplicationInsightsResource": "Failed to update Application Insights '%s' Resource. Error: %s", - "loc.messages.RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method." + "loc.messages.RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method.", + "loc.messages.MSDeployNotSupportTokenAuth": "App Service is configured to not use basic authentication. This requires Web Deploy msdeploy.exe version 7.1.7225 or higher. You need a version of Visual Studio that includes an updated version of msdeploy.exe. For more information, visit https://aka.ms/azdo-webapp-msdeploy ." } \ No newline at end of file diff --git a/_generated/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts b/_generated/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts index 24f9758e8e28..00dcbff4683c 100644 --- a/_generated/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts +++ b/_generated/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts @@ -1,11 +1,11 @@ import tl = require('azure-pipelines-task-lib/task'); -import { TaskParameters } from './TaskParameters'; -import { WebDeployArguments, WebDeployResult } from 'azure-pipelines-tasks-webdeployment-common/msdeployutility'; +import { WebDeployArguments, WebDeployResult, shouldUseMSDeployTokenAuth, installedMSDeployVersionSupportsTokenAuth } from 'azure-pipelines-tasks-webdeployment-common/msdeployutility'; import { executeWebDeploy } from 'azure-pipelines-tasks-webdeployment-common/deployusingmsdeploy'; import { copySetParamFileIfItExists } from 'azure-pipelines-tasks-webdeployment-common/utility'; + +import { TaskParameters } from './TaskParameters'; import { AzureAppServiceUtility } from './AzureAppServiceUtility'; -import { shouldUseMSDeployTokenAuth } from 'azure-pipelines-tasks-webdeployment-common/msdeployutility' const DEFAULT_RETRY_COUNT = 3; @@ -61,14 +61,17 @@ export class WebDeployUtility { webDeployArguments.userName = publishProfile.userName; webDeployArguments.password = publishProfile.userPWD; } - else if (shouldUseMSDeployTokenAuth()) { + else if (!shouldUseMSDeployTokenAuth()) { + throw new Error(tl.loc("BasicAuthNotSupported")); + } + else if (await installedMSDeployVersionSupportsTokenAuth() === false) { + throw new Error(tl.loc("MSDeployNotSupportTokenAuth")); + } + else { tl.debug("Basic authentication is disabled, using token based authentication."); webDeployArguments.authType = "Bearer"; webDeployArguments.password = await this._azureAppServiceUtility.getAuthToken(); webDeployArguments.userName = "user"; // arbitrary but not empty - } - else { - throw new Error(tl.loc("BasicAuthNotSupported")); } webDeployArguments.publishUrl = publishProfile.publishUrl; diff --git a/_generated/AzureRmWebAppDeploymentV4/package-lock.json b/_generated/AzureRmWebAppDeploymentV4/package-lock.json index 0ab402f16f3a..02c325f4b805 100644 --- a/_generated/AzureRmWebAppDeploymentV4/package-lock.json +++ b/_generated/AzureRmWebAppDeploymentV4/package-lock.json @@ -237,9 +237,9 @@ } }, "azure-pipelines-tasks-webdeployment-common": { - "version": "4.230.3", - "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-webdeployment-common/-/azure-pipelines-tasks-webdeployment-common-4.230.3.tgz", - "integrity": "sha512-Z8YVQZfwnit3iNwL+FhF9fTFObnzypQViUgX1Ms8Gtc6/+3+RCzpL9QAbsJ5Qkmy42kZjaAhCdNfrqIpS9ATAw==", + "version": "4.230.4", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-webdeployment-common/-/azure-pipelines-tasks-webdeployment-common-4.230.4.tgz", + "integrity": "sha512-1/bo0e7rajimESJdd6zsbLnQ8HqSavhgj5jBav7s0jnOWxFxocZGoKF/LkBLHWaDEiQ3ClyNTW5szbhijX1Tzw==", "requires": { "@types/ltx": "3.0.6", "@types/mocha": "^5.2.7", @@ -251,6 +251,7 @@ "ltx": "2.8.0", "node-stream-zip": "^1.15.0", "q": "1.4.1", + "semver": "^7.5.4", "winreg": "1.2.2", "xml2js": "0.6.2" }, @@ -275,9 +276,22 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==" + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" } } }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, "xml2js": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", @@ -783,6 +797,14 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, "ltx": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.8.0.tgz", @@ -1235,6 +1257,11 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "zip-stream": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", diff --git a/_generated/AzureRmWebAppDeploymentV4/package.json b/_generated/AzureRmWebAppDeploymentV4/package.json index 8d99289be16d..2e2f37460a84 100644 --- a/_generated/AzureRmWebAppDeploymentV4/package.json +++ b/_generated/AzureRmWebAppDeploymentV4/package.json @@ -22,7 +22,7 @@ "@types/q": "1.0.7", "azure-pipelines-task-lib": "^3.4.0", "azure-pipelines-tasks-azure-arm-rest": "3.223.5", - "azure-pipelines-tasks-webdeployment-common": "4.230.3", + "azure-pipelines-tasks-webdeployment-common": "4.230.4", "moment": "^2.29.4", "q": "1.4.1", "uuid": "3.1.0", diff --git a/_generated/AzureRmWebAppDeploymentV4/task.json b/_generated/AzureRmWebAppDeploymentV4/task.json index 2a61fcd2cb93..45c72fb0056b 100644 --- a/_generated/AzureRmWebAppDeploymentV4/task.json +++ b/_generated/AzureRmWebAppDeploymentV4/task.json @@ -18,7 +18,7 @@ "version": { "Major": 4, "Minor": 230, - "Patch": 3 + "Patch": 5 }, "releaseNotes": "What's new in version 4.*
Supports Zip Deploy, Run From Package, War Deploy [Details here](https://aka.ms/appServiceDeploymentMethods)
Supports App Service Environments
Improved UI for discovering different App service types supported by the task
Run From Package is the preferred deployment method, which makes files in wwwroot folder read-only
Click [here](https://aka.ms/azurermwebdeployreadme) for more information.", "minimumAgentVersion": "2.104.1", @@ -651,10 +651,11 @@ "FailedToGetResourceID": "Failed to get resource ID for resource type '%s' and resource name '%s'. Error: %s", "JarPathNotPresent": "Java jar path is not present", "FailedToUpdateApplicationInsightsResource": "Failed to update Application Insights '%s' Resource. Error: %s", - "RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method." + "RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method.", + "MSDeployNotSupportTokenAuth": "App Service is configured to not use basic authentication. This requires Web Deploy msdeploy.exe version 7.1.7225 or higher. You need a version of Visual Studio that includes an updated version of msdeploy.exe. For more information, visit https://aka.ms/azdo-webapp-msdeploy ." }, "_buildConfigMapping": { - "Default": "4.230.3", - "Node16-225": "4.230.4" + "Default": "4.230.5", + "Node16-225": "4.230.6" } } \ No newline at end of file diff --git a/_generated/AzureRmWebAppDeploymentV4/task.loc.json b/_generated/AzureRmWebAppDeploymentV4/task.loc.json index 11ef45f9129e..0a96cc5976ee 100644 --- a/_generated/AzureRmWebAppDeploymentV4/task.loc.json +++ b/_generated/AzureRmWebAppDeploymentV4/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 4, "Minor": 230, - "Patch": 3 + "Patch": 5 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.104.1", @@ -651,10 +651,11 @@ "FailedToGetResourceID": "ms-resource:loc.messages.FailedToGetResourceID", "JarPathNotPresent": "ms-resource:loc.messages.JarPathNotPresent", "FailedToUpdateApplicationInsightsResource": "ms-resource:loc.messages.FailedToUpdateApplicationInsightsResource", - "RunFromZipPreventsFileInUseError": "ms-resource:loc.messages.RunFromZipPreventsFileInUseError" + "RunFromZipPreventsFileInUseError": "ms-resource:loc.messages.RunFromZipPreventsFileInUseError", + "MSDeployNotSupportTokenAuth": "ms-resource:loc.messages.MSDeployNotSupportTokenAuth" }, "_buildConfigMapping": { - "Default": "4.230.3", - "Node16-225": "4.230.4" + "Default": "4.230.5", + "Node16-225": "4.230.6" } } \ No newline at end of file diff --git a/_generated/AzureRmWebAppDeploymentV4_Node16/Strings/resources.resjson/en-US/resources.resjson b/_generated/AzureRmWebAppDeploymentV4_Node16/Strings/resources.resjson/en-US/resources.resjson index 3a8e1b97db4b..dfb1c49dc866 100644 --- a/_generated/AzureRmWebAppDeploymentV4_Node16/Strings/resources.resjson/en-US/resources.resjson +++ b/_generated/AzureRmWebAppDeploymentV4_Node16/Strings/resources.resjson/en-US/resources.resjson @@ -225,5 +225,6 @@ "loc.messages.FailedToGetResourceID": "Failed to get resource ID for resource type '%s' and resource name '%s'. Error: %s", "loc.messages.JarPathNotPresent": "Java jar path is not present", "loc.messages.FailedToUpdateApplicationInsightsResource": "Failed to update Application Insights '%s' Resource. Error: %s", - "loc.messages.RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method." + "loc.messages.RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method.", + "loc.messages.MSDeployNotSupportTokenAuth": "App Service is configured to not use basic authentication. This requires Web Deploy msdeploy.exe version 7.1.7225 or higher. You need a version of Visual Studio that includes an updated version of msdeploy.exe. For more information, visit https://aka.ms/azdo-webapp-msdeploy ." } \ No newline at end of file diff --git a/_generated/AzureRmWebAppDeploymentV4_Node16/operations/WebDeployUtility.ts b/_generated/AzureRmWebAppDeploymentV4_Node16/operations/WebDeployUtility.ts index 24f9758e8e28..00dcbff4683c 100644 --- a/_generated/AzureRmWebAppDeploymentV4_Node16/operations/WebDeployUtility.ts +++ b/_generated/AzureRmWebAppDeploymentV4_Node16/operations/WebDeployUtility.ts @@ -1,11 +1,11 @@ import tl = require('azure-pipelines-task-lib/task'); -import { TaskParameters } from './TaskParameters'; -import { WebDeployArguments, WebDeployResult } from 'azure-pipelines-tasks-webdeployment-common/msdeployutility'; +import { WebDeployArguments, WebDeployResult, shouldUseMSDeployTokenAuth, installedMSDeployVersionSupportsTokenAuth } from 'azure-pipelines-tasks-webdeployment-common/msdeployutility'; import { executeWebDeploy } from 'azure-pipelines-tasks-webdeployment-common/deployusingmsdeploy'; import { copySetParamFileIfItExists } from 'azure-pipelines-tasks-webdeployment-common/utility'; + +import { TaskParameters } from './TaskParameters'; import { AzureAppServiceUtility } from './AzureAppServiceUtility'; -import { shouldUseMSDeployTokenAuth } from 'azure-pipelines-tasks-webdeployment-common/msdeployutility' const DEFAULT_RETRY_COUNT = 3; @@ -61,14 +61,17 @@ export class WebDeployUtility { webDeployArguments.userName = publishProfile.userName; webDeployArguments.password = publishProfile.userPWD; } - else if (shouldUseMSDeployTokenAuth()) { + else if (!shouldUseMSDeployTokenAuth()) { + throw new Error(tl.loc("BasicAuthNotSupported")); + } + else if (await installedMSDeployVersionSupportsTokenAuth() === false) { + throw new Error(tl.loc("MSDeployNotSupportTokenAuth")); + } + else { tl.debug("Basic authentication is disabled, using token based authentication."); webDeployArguments.authType = "Bearer"; webDeployArguments.password = await this._azureAppServiceUtility.getAuthToken(); webDeployArguments.userName = "user"; // arbitrary but not empty - } - else { - throw new Error(tl.loc("BasicAuthNotSupported")); } webDeployArguments.publishUrl = publishProfile.publishUrl; diff --git a/_generated/AzureRmWebAppDeploymentV4_Node16/package-lock.json b/_generated/AzureRmWebAppDeploymentV4_Node16/package-lock.json index 902e6fbc6067..8c9bcbbe36b6 100644 --- a/_generated/AzureRmWebAppDeploymentV4_Node16/package-lock.json +++ b/_generated/AzureRmWebAppDeploymentV4_Node16/package-lock.json @@ -243,9 +243,9 @@ } }, "azure-pipelines-tasks-webdeployment-common": { - "version": "4.230.3", - "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-webdeployment-common/-/azure-pipelines-tasks-webdeployment-common-4.230.3.tgz", - "integrity": "sha512-Z8YVQZfwnit3iNwL+FhF9fTFObnzypQViUgX1Ms8Gtc6/+3+RCzpL9QAbsJ5Qkmy42kZjaAhCdNfrqIpS9ATAw==", + "version": "4.230.4", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-webdeployment-common/-/azure-pipelines-tasks-webdeployment-common-4.230.4.tgz", + "integrity": "sha512-1/bo0e7rajimESJdd6zsbLnQ8HqSavhgj5jBav7s0jnOWxFxocZGoKF/LkBLHWaDEiQ3ClyNTW5szbhijX1Tzw==", "requires": { "@types/ltx": "3.0.6", "@types/mocha": "^5.2.7", @@ -257,6 +257,7 @@ "ltx": "2.8.0", "node-stream-zip": "^1.15.0", "q": "1.4.1", + "semver": "^7.5.4", "winreg": "1.2.2", "xml2js": "0.6.2" }, @@ -266,6 +267,14 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, "xml2js": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", @@ -751,6 +760,14 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, "ltx": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.8.0.tgz", @@ -1147,6 +1164,11 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "zip-stream": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", diff --git a/_generated/AzureRmWebAppDeploymentV4_Node16/package.json b/_generated/AzureRmWebAppDeploymentV4_Node16/package.json index c64ffa3989d9..0b20f30449af 100644 --- a/_generated/AzureRmWebAppDeploymentV4_Node16/package.json +++ b/_generated/AzureRmWebAppDeploymentV4_Node16/package.json @@ -22,7 +22,7 @@ "@types/q": "1.0.7", "azure-pipelines-task-lib": "4.4.0", "azure-pipelines-tasks-azure-arm-rest": "3.223.5", - "azure-pipelines-tasks-webdeployment-common": "4.230.3", + "azure-pipelines-tasks-webdeployment-common": "4.230.4", "moment": "^2.29.4", "q": "1.4.1", "uuid": "3.1.0", diff --git a/_generated/AzureRmWebAppDeploymentV4_Node16/task.json b/_generated/AzureRmWebAppDeploymentV4_Node16/task.json index 7f337e6a33ea..2f12cd899903 100644 --- a/_generated/AzureRmWebAppDeploymentV4_Node16/task.json +++ b/_generated/AzureRmWebAppDeploymentV4_Node16/task.json @@ -18,7 +18,7 @@ "version": { "Major": 4, "Minor": 230, - "Patch": 4 + "Patch": 6 }, "releaseNotes": "What's new in version 4.*
Supports Zip Deploy, Run From Package, War Deploy [Details here](https://aka.ms/appServiceDeploymentMethods)
Supports App Service Environments
Improved UI for discovering different App service types supported by the task
Run From Package is the preferred deployment method, which makes files in wwwroot folder read-only
Click [here](https://aka.ms/azurermwebdeployreadme) for more information.", "minimumAgentVersion": "2.104.1", @@ -655,10 +655,11 @@ "FailedToGetResourceID": "Failed to get resource ID for resource type '%s' and resource name '%s'. Error: %s", "JarPathNotPresent": "Java jar path is not present", "FailedToUpdateApplicationInsightsResource": "Failed to update Application Insights '%s' Resource. Error: %s", - "RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method." + "RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method.", + "MSDeployNotSupportTokenAuth": "App Service is configured to not use basic authentication. This requires Web Deploy msdeploy.exe version 7.1.7225 or higher. You need a version of Visual Studio that includes an updated version of msdeploy.exe. For more information, visit https://aka.ms/azdo-webapp-msdeploy ." }, "_buildConfigMapping": { - "Default": "4.230.3", - "Node16-225": "4.230.4" + "Default": "4.230.5", + "Node16-225": "4.230.6" } } \ No newline at end of file diff --git a/_generated/AzureRmWebAppDeploymentV4_Node16/task.loc.json b/_generated/AzureRmWebAppDeploymentV4_Node16/task.loc.json index df54dd30ce10..dc5d8a2263e5 100644 --- a/_generated/AzureRmWebAppDeploymentV4_Node16/task.loc.json +++ b/_generated/AzureRmWebAppDeploymentV4_Node16/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 4, "Minor": 230, - "Patch": 4 + "Patch": 6 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.104.1", @@ -655,10 +655,11 @@ "FailedToGetResourceID": "ms-resource:loc.messages.FailedToGetResourceID", "JarPathNotPresent": "ms-resource:loc.messages.JarPathNotPresent", "FailedToUpdateApplicationInsightsResource": "ms-resource:loc.messages.FailedToUpdateApplicationInsightsResource", - "RunFromZipPreventsFileInUseError": "ms-resource:loc.messages.RunFromZipPreventsFileInUseError" + "RunFromZipPreventsFileInUseError": "ms-resource:loc.messages.RunFromZipPreventsFileInUseError", + "MSDeployNotSupportTokenAuth": "ms-resource:loc.messages.MSDeployNotSupportTokenAuth" }, "_buildConfigMapping": { - "Default": "4.230.3", - "Node16-225": "4.230.4" + "Default": "4.230.5", + "Node16-225": "4.230.6" } } \ No newline at end of file From d9ac1db5eb6cc94e0655606a94b9559fc18f16f9 Mon Sep 17 00:00:00 2001 From: Ondrej Netocny Date: Fri, 27 Oct 2023 11:31:54 +0200 Subject: [PATCH 2/2] Fix resource files --- .../Strings/resources.resjson/en-US/resources.resjson | 3 ++- Tasks/AzureRmWebAppDeploymentV4/task.loc.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Tasks/AzureRmWebAppDeploymentV4/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureRmWebAppDeploymentV4/Strings/resources.resjson/en-US/resources.resjson index 3a8e1b97db4b..dfb1c49dc866 100644 --- a/Tasks/AzureRmWebAppDeploymentV4/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/AzureRmWebAppDeploymentV4/Strings/resources.resjson/en-US/resources.resjson @@ -225,5 +225,6 @@ "loc.messages.FailedToGetResourceID": "Failed to get resource ID for resource type '%s' and resource name '%s'. Error: %s", "loc.messages.JarPathNotPresent": "Java jar path is not present", "loc.messages.FailedToUpdateApplicationInsightsResource": "Failed to update Application Insights '%s' Resource. Error: %s", - "loc.messages.RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method." + "loc.messages.RunFromZipPreventsFileInUseError": "Move from Web Deploy to RunFrom Package, which helps in avoiding FILE_IN_USE error. Note that Run From Package does not support msBuild package type. Please change your package format to use this deployment method.", + "loc.messages.MSDeployNotSupportTokenAuth": "App Service is configured to not use basic authentication. This requires Web Deploy msdeploy.exe version 7.1.7225 or higher. You need a version of Visual Studio that includes an updated version of msdeploy.exe. For more information, visit https://aka.ms/azdo-webapp-msdeploy ." } \ No newline at end of file diff --git a/Tasks/AzureRmWebAppDeploymentV4/task.loc.json b/Tasks/AzureRmWebAppDeploymentV4/task.loc.json index 3fce91e0cd1a..60a764212157 100644 --- a/Tasks/AzureRmWebAppDeploymentV4/task.loc.json +++ b/Tasks/AzureRmWebAppDeploymentV4/task.loc.json @@ -651,6 +651,7 @@ "FailedToGetResourceID": "ms-resource:loc.messages.FailedToGetResourceID", "JarPathNotPresent": "ms-resource:loc.messages.JarPathNotPresent", "FailedToUpdateApplicationInsightsResource": "ms-resource:loc.messages.FailedToUpdateApplicationInsightsResource", - "RunFromZipPreventsFileInUseError": "ms-resource:loc.messages.RunFromZipPreventsFileInUseError" + "RunFromZipPreventsFileInUseError": "ms-resource:loc.messages.RunFromZipPreventsFileInUseError", + "MSDeployNotSupportTokenAuth": "ms-resource:loc.messages.MSDeployNotSupportTokenAuth" } } \ No newline at end of file