azure-pipelines-tasks-azurermdeploycommon 3.221.0 → 3.221.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -141,17 +141,17 @@ class AzureAppServiceUtility {
|
|
|
141
141
|
getKuduAuthHeader(publishingCredentials) {
|
|
142
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
143
143
|
const scmPolicyCheck = yield this.isSitePublishingCredentialsEnabled();
|
|
144
|
-
if (
|
|
144
|
+
if (scmPolicyCheck === false) {
|
|
145
|
+
tl.debug('Kudu: Getting Bearer token');
|
|
145
146
|
const accessToken = yield this._appService._client.getCredentials().getToken();
|
|
146
|
-
tl.debug("Kudu: using bearer token.");
|
|
147
147
|
return "Bearer " + accessToken;
|
|
148
148
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
else {
|
|
150
|
+
tl.setVariable(`AZURE_APP_SERVICE_KUDU_${this._appService.getSlot()}_PASSWORD`, publishingCredentials.properties["publishingPassword"], true);
|
|
151
|
+
var accessToken = (new Buffer(publishingCredentials.properties["publishingUserName"] + ':' + publishingCredentials.properties["publishingPassword"]).toString('base64'));
|
|
152
|
+
tl.debug("Kudu: using basic auth.");
|
|
153
|
+
return "Basic " + accessToken;
|
|
154
|
+
}
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
getPhysicalPath(virtualApplication) {
|
|
@@ -301,8 +301,8 @@ class AzureAppServiceUtility {
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
catch (error) {
|
|
304
|
-
tl.debug(`
|
|
305
|
-
return
|
|
304
|
+
tl.debug(`Call to get SCM Policy check failed: ${error}`);
|
|
305
|
+
return false;
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
}
|
|
@@ -134,20 +134,17 @@ export class AzureAppServiceUtility {
|
|
|
134
134
|
private async getKuduAuthHeader(publishingCredentials: any): Promise<string> {
|
|
135
135
|
const scmPolicyCheck = await this.isSitePublishingCredentialsEnabled();
|
|
136
136
|
|
|
137
|
-
if
|
|
137
|
+
if(scmPolicyCheck === false) {
|
|
138
|
+
tl.debug('Kudu: Getting Bearer token');
|
|
138
139
|
const accessToken = await this._appService._client.getCredentials().getToken();
|
|
139
|
-
tl.debug("Kudu: using bearer token.");
|
|
140
140
|
return "Bearer " + accessToken;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
} else {
|
|
142
|
+
tl.setVariable(`AZURE_APP_SERVICE_KUDU_${this._appService.getSlot()}_PASSWORD`, publishingCredentials.properties["publishingPassword"], true);
|
|
143
|
+
var accessToken = (new Buffer(publishingCredentials.properties["publishingUserName"] + ':' + publishingCredentials.properties["publishingPassword"]).toString('base64'));
|
|
144
|
+
tl.debug("Kudu: using basic auth.");
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
const auth = (new Buffer(userName + ':' + password).toString('base64'));
|
|
150
|
-
return "Basic " + auth;
|
|
146
|
+
return "Basic " + accessToken;
|
|
147
|
+
}
|
|
151
148
|
}
|
|
152
149
|
|
|
153
150
|
public async getPhysicalPath(virtualApplication: string): Promise<string> {
|
|
@@ -309,8 +306,8 @@ export class AzureAppServiceUtility {
|
|
|
309
306
|
}
|
|
310
307
|
}
|
|
311
308
|
catch(error){
|
|
312
|
-
tl.debug(`
|
|
313
|
-
return
|
|
309
|
+
tl.debug(`Call to get SCM Policy check failed: ${error}`);
|
|
310
|
+
return false;
|
|
314
311
|
}
|
|
315
312
|
}
|
|
316
313
|
|