azure-pipelines-tasks-azurermdeploycommon 3.219.0 → 3.221.0
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.
- package/Strings/resources.resjson/de-DE/resources.resjson +69 -69
- package/Strings/resources.resjson/es-ES/resources.resjson +58 -58
- package/Strings/resources.resjson/fr-FR/resources.resjson +84 -84
- package/Strings/resources.resjson/it-IT/resources.resjson +36 -36
- package/Strings/resources.resjson/ja-JP/resources.resjson +32 -32
- package/Strings/resources.resjson/ko-KR/resources.resjson +25 -25
- package/Strings/resources.resjson/ru-RU/resources.resjson +52 -52
- package/Strings/resources.resjson/zh-CN/resources.resjson +1 -1
- package/Strings/resources.resjson/zh-TW/resources.resjson +28 -28
- package/Tests/azure-arm-app-service-kudu-tests.js +35 -35
- package/Tests/azure-arm-app-service-kudu-tests.ts +35 -35
- package/azure-arm-rest/Strings/resources.resjson/de-DE/resources.resjson +61 -61
- package/azure-arm-rest/Strings/resources.resjson/es-ES/resources.resjson +49 -49
- package/azure-arm-rest/Strings/resources.resjson/fr-FR/resources.resjson +80 -80
- package/azure-arm-rest/Strings/resources.resjson/it-IT/resources.resjson +33 -33
- package/azure-arm-rest/Strings/resources.resjson/ja-JP/resources.resjson +31 -31
- package/azure-arm-rest/Strings/resources.resjson/ko-KR/resources.resjson +23 -23
- package/azure-arm-rest/Strings/resources.resjson/ru-RU/resources.resjson +51 -51
- package/azure-arm-rest/Strings/resources.resjson/zh-CN/resources.resjson +1 -1
- package/azure-arm-rest/Strings/resources.resjson/zh-TW/resources.resjson +26 -26
- package/azure-arm-rest/azure-arm-app-service-kudu.d.ts +3 -3
- package/azure-arm-rest/azure-arm-app-service-kudu.js +5 -6
- package/azure-arm-rest/azure-arm-app-service-kudu.ts +6 -7
- package/azure-arm-rest/azure-arm-app-service.d.ts +1 -0
- package/azure-arm-rest/azure-arm-app-service.js +21 -0
- package/azure-arm-rest/azure-arm-app-service.ts +23 -0
- package/operations/AzureAppServiceUtility.d.ts +2 -0
- package/operations/AzureAppServiceUtility.js +42 -5
- package/operations/AzureAppServiceUtility.ts +47 -6
- package/package.json +1 -1
|
@@ -118,14 +118,36 @@ export class AzureAppServiceUtility {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
public async getKuduService(): Promise<Kudu> {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
public async getKuduService(): Promise<Kudu> {
|
|
122
|
+
|
|
123
|
+
const publishingCredentials = await this._appService.getPublishingCredentials();
|
|
124
|
+
const scmUri = publishingCredentials.properties["scmUri"];
|
|
125
|
+
|
|
126
|
+
if (!scmUri) {
|
|
127
|
+
throw Error(tl.loc('KuduSCMDetailsAreEmpty'));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const authHeader = await this.getKuduAuthHeader(publishingCredentials);
|
|
131
|
+
return new Kudu(publishingCredentials.properties["scmUri"], authHeader);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
private async getKuduAuthHeader(publishingCredentials: any): Promise<string> {
|
|
135
|
+
const scmPolicyCheck = await this.isSitePublishingCredentialsEnabled();
|
|
136
|
+
|
|
137
|
+
if (!scmPolicyCheck) {
|
|
138
|
+
const accessToken = await this._appService._client.getCredentials().getToken();
|
|
139
|
+
tl.debug("Kudu: using bearer token.");
|
|
140
|
+
return "Bearer " + accessToken;
|
|
126
141
|
}
|
|
127
142
|
|
|
128
|
-
|
|
143
|
+
const password = publishingCredentials.properties["publishingPassword"];
|
|
144
|
+
const userName = publishingCredentials.properties["publishingUserName"];
|
|
145
|
+
|
|
146
|
+
tl.setVariable(`AZURE_APP_SERVICE_KUDU_${this._appService.getSlot()}_PASSWORD`, password, true);
|
|
147
|
+
tl.debug("Kudu: using basic auth.");
|
|
148
|
+
|
|
149
|
+
const auth = (new Buffer(userName + ':' + password).toString('base64'));
|
|
150
|
+
return "Basic " + auth;
|
|
129
151
|
}
|
|
130
152
|
|
|
131
153
|
public async getPhysicalPath(virtualApplication: string): Promise<string> {
|
|
@@ -273,6 +295,25 @@ export class AzureAppServiceUtility {
|
|
|
273
295
|
}
|
|
274
296
|
}
|
|
275
297
|
|
|
298
|
+
public async isSitePublishingCredentialsEnabled(): Promise<boolean>{
|
|
299
|
+
try{
|
|
300
|
+
let scmAuthPolicy: any = await this._appService.getSitePublishingCredentialPolicies();
|
|
301
|
+
tl.debug(`Site Publishing Policy check: ${JSON.stringify(scmAuthPolicy)}`);
|
|
302
|
+
if(scmAuthPolicy && scmAuthPolicy.properties.allow) {
|
|
303
|
+
tl.debug("Function App does allow SCM access");
|
|
304
|
+
return true;
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
tl.debug("Function App does not allow SCM Access");
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
catch(error){
|
|
312
|
+
tl.debug(`Skipping SCM Policy check: ${error}`);
|
|
313
|
+
return null;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
276
317
|
private async _getPhysicalToVirtualPathMap(virtualApplication: string): Promise<any> {
|
|
277
318
|
// construct URL depending on virtualApplication or root of webapplication
|
|
278
319
|
var physicalPath = null;
|