azure-pipelines-tasks-azurermdeploycommon 3.236.0 → 3.241.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.
@@ -96,6 +96,7 @@
96
96
  "loc.messages.FailedToGetAppServiceApplicationSettings": "Fehler beim Abrufen der Anwendungseinstellungen für App Service „%s“. Fehler: %s",
97
97
  "loc.messages.FailedToUpdateAppServiceApplicationSettings": "Fehler beim Aktualisieren der Anwendungseinstellungen für App Service \"%s\". Fehler: %s",
98
98
  "loc.messages.KuduSCMDetailsAreEmpty": "KUDU SCM-Details sind leer.",
99
+ "loc.messages.KuduStackTraceURL": "Überprüfen Sie zum weiteren Debuggen die URL für die Kudu-Stapelüberwachung: %s",
99
100
  "loc.messages.FailedToGetContinuousWebJobs": "Fehler beim Abrufen fortlaufender WebJobs. Fehler: %s",
100
101
  "loc.messages.FailedToStartContinuousWebJob": "Fehler beim Starten des fortlaufenden WebJobs „%s“. Fehler: %s",
101
102
  "loc.messages.FailedToStopContinuousWebJob": "Fehler beim Beenden des fortlaufenden WebJobs „%s“. Fehler: %s",
@@ -96,6 +96,7 @@
96
96
  "loc.messages.FailedToGetAppServiceApplicationSettings": "Se produjo un error al obtener la configuración de aplicación de App Service \"%s\". Error: %s",
97
97
  "loc.messages.FailedToUpdateAppServiceApplicationSettings": "No se pudo actualizar la configuración de aplicación de la instancia de App Service \"%s\". Error: %s",
98
98
  "loc.messages.KuduSCMDetailsAreEmpty": "Los detalles de KUDU SCM están vacíos.",
99
+ "loc.messages.KuduStackTraceURL": "Para depurar aún más, compruebe la dirección URL de seguimiento de pila de Kudu: %s",
99
100
  "loc.messages.FailedToGetContinuousWebJobs": "Se produjo un error al obtener WebJobs continuos. Error: %s",
100
101
  "loc.messages.FailedToStartContinuousWebJob": "Se produjo un error al iniciar el WebJob continuo \"%s\". Error: %s",
101
102
  "loc.messages.FailedToStopContinuousWebJob": "Se produjo un error al detener el WebJob continuo \"%s\". Error: %s",
@@ -96,6 +96,7 @@
96
96
  "loc.messages.FailedToGetAppServiceApplicationSettings": "Nous n’avons pas pu obtenir des paramètres d’application de l’App Service '%s'. Erreur : %s",
97
97
  "loc.messages.FailedToUpdateAppServiceApplicationSettings": "Nous n’avons pas pu effectuer la mise à jour des paramètres d’application de l’App Service '%s'. Erreur : %s",
98
98
  "loc.messages.KuduSCMDetailsAreEmpty": "Les détails du GCS KUDU sont vides",
99
+ "loc.messages.KuduStackTraceURL": "Pour déboguer davantage, consultez l'URL de l'arborescence des appels de procédure Kudu : %s",
99
100
  "loc.messages.FailedToGetContinuousWebJobs": "Échec de l’obtention des WebJobs continus. Erreur : %s",
100
101
  "loc.messages.FailedToStartContinuousWebJob": "Échec du démarrage du WebJob continu '%s'. Erreur : %s",
101
102
  "loc.messages.FailedToStopContinuousWebJob": "Échec de l’arrêt du WebJob continu '%s'. Erreur : %s",
@@ -96,6 +96,7 @@
96
96
  "loc.messages.FailedToGetAppServiceApplicationSettings": "Non è stato possibile ottenere le impostazioni applicazione del servizio app '%s'. Errore: %s",
97
97
  "loc.messages.FailedToUpdateAppServiceApplicationSettings": "Non è stato possibile aggiornare le impostazioni applicazione del servizio app '%s'. Errore: %s",
98
98
  "loc.messages.KuduSCMDetailsAreEmpty": "I dettagli di Gestione controllo servizi di Kudu sono vuoti",
99
+ "loc.messages.KuduStackTraceURL": "Per approfondire il debug, vedere l'URL di analisi dello stack di Kudu: %s",
99
100
  "loc.messages.FailedToGetContinuousWebJobs": "Non è stato possibile ottenere processi Web continui. Errore: %s",
100
101
  "loc.messages.FailedToStartContinuousWebJob": "Non è stato possibile avviare il processo Web continuo '%s'. Errore: %s",
101
102
  "loc.messages.FailedToStopContinuousWebJob": "Non è stato possibile arrestare il processo Web continuo '%s'. Errore: %s",
@@ -96,6 +96,7 @@
96
96
  "loc.messages.FailedToGetAppServiceApplicationSettings": "App Service '%s' アプリケーション設定を取得できませんでした。エラー: %s",
97
97
  "loc.messages.FailedToUpdateAppServiceApplicationSettings": "App Service '%s' アプリケーション設定を更新できませんでした。エラー: %s",
98
98
  "loc.messages.KuduSCMDetailsAreEmpty": "KUDU SCM の詳細が空です",
99
+ "loc.messages.KuduStackTraceURL": "さらにデバッグするには、Kudu スタック トレースの URL %s をご確認ください",
99
100
  "loc.messages.FailedToGetContinuousWebJobs": "継続的 WebJob を取得できませんでした。エラー: %s",
100
101
  "loc.messages.FailedToStartContinuousWebJob": "継続的 WebJob '%s' を開始できませんでした。エラー: %s",
101
102
  "loc.messages.FailedToStopContinuousWebJob": "継続的 WebJob '%s' を停止できませんでした。エラー: %s",
@@ -96,6 +96,7 @@
96
96
  "loc.messages.FailedToGetAppServiceApplicationSettings": "App Service '%s' 애플리케이션 설정을 가져오지 못했습니다. 오류: %s",
97
97
  "loc.messages.FailedToUpdateAppServiceApplicationSettings": "App Service '%s' 애플리케이션 설정을 업데이트하지 못했습니다. 오류: %s",
98
98
  "loc.messages.KuduSCMDetailsAreEmpty": "KUDU SCM 정보가 비어 있음",
99
+ "loc.messages.KuduStackTraceURL": "추가로 디버깅하려면 Kudu 스택 추적 URL(%s)을 확인하세요.",
99
100
  "loc.messages.FailedToGetContinuousWebJobs": "연속 WebJob을 가져오지 못했습니다. 오류: %s",
100
101
  "loc.messages.FailedToStartContinuousWebJob": "연속 WebJob '%s'을(를) 시작하지 못했습니다. 오류: %s",
101
102
  "loc.messages.FailedToStopContinuousWebJob": "연속 WebJob '%s'을(를) 중지하지 못했습니다. 오류: %s",
@@ -96,6 +96,7 @@
96
96
  "loc.messages.FailedToGetAppServiceApplicationSettings": "Не удалось получить параметры приложения для службы приложений \"%s\". Ошибка: %s",
97
97
  "loc.messages.FailedToUpdateAppServiceApplicationSettings": "Не удалось обновить параметры приложения для службы приложений \"%s\". Ошибка: %s",
98
98
  "loc.messages.KuduSCMDetailsAreEmpty": "Сведения о SCM KUDU отсутствуют",
99
+ "loc.messages.KuduStackTraceURL": "Для дальнейшей отладки проверьте URL-адрес трассировки стека Kudu: %s",
99
100
  "loc.messages.FailedToGetContinuousWebJobs": "Не удалось получить непрерывные веб-задания. Ошибка: %s",
100
101
  "loc.messages.FailedToStartContinuousWebJob": "Не удалось запустить непрерывное веб-задание \"%s\". Ошибка: %s",
101
102
  "loc.messages.FailedToStopContinuousWebJob": "Не удалось остановить непрерывное веб-задание \"%s\". Ошибка: %s",
@@ -96,6 +96,7 @@
96
96
  "loc.messages.FailedToGetAppServiceApplicationSettings": "未能获取应用服务“%s”应用程序设置。错误: %s",
97
97
  "loc.messages.FailedToUpdateAppServiceApplicationSettings": "未能更新应用服务“%s”应用程序设置。错误: %s",
98
98
  "loc.messages.KuduSCMDetailsAreEmpty": "KUDU SCM 详细信息为空",
99
+ "loc.messages.KuduStackTraceURL": "若要进行进一步调试,请检查 Kudu 堆栈跟踪 URL: %s",
99
100
  "loc.messages.FailedToGetContinuousWebJobs": "未能获取持续 Web 作业。错误: %s",
100
101
  "loc.messages.FailedToStartContinuousWebJob": "未能启动持续 Web 作业“%s”。错误: %s",
101
102
  "loc.messages.FailedToStopContinuousWebJob": "未能停止持续 Web 作业“%s”。错误: %s",
@@ -96,6 +96,7 @@
96
96
  "loc.messages.FailedToGetAppServiceApplicationSettings": "無法取得 App Service '%s' 應用程式設定。錯誤: %s",
97
97
  "loc.messages.FailedToUpdateAppServiceApplicationSettings": "無法更新 App Service '%s' 應用程式設定。錯誤: %s",
98
98
  "loc.messages.KuduSCMDetailsAreEmpty": "KUDU SCM 詳細資料空白",
99
+ "loc.messages.KuduStackTraceURL": "若要進一步偵錯,請檢查 Kudu 堆疊追蹤 URL: %s",
99
100
  "loc.messages.FailedToGetContinuousWebJobs": "無法取得持續 WebJob。錯誤: %s",
100
101
  "loc.messages.FailedToStartContinuousWebJob": "無法啟動持續 WebJob '%s'。錯誤: %s",
101
102
  "loc.messages.FailedToStopContinuousWebJob": "無法停止持續 WebJob '%s'。錯誤: %s",
@@ -31,6 +31,7 @@ export declare class Kudu {
31
31
  getKuduStackTrace(): string;
32
32
  zipDeploy(webPackage: string, queryParameters?: Array<string>): Promise<any>;
33
33
  warDeploy(webPackage: string, queryParameters?: Array<string>): Promise<any>;
34
+ oneDeploy(webPackage: string, queryParameters?: Array<string>): Promise<any>;
34
35
  getDeploymentDetails(deploymentID: string): Promise<any>;
35
36
  getDeploymentLogs(log_url: string): Promise<any>;
36
37
  deleteFile(physicalPath: string, fileName: string): Promise<void>;
@@ -507,6 +507,43 @@ class Kudu {
507
507
  }
508
508
  });
509
509
  }
510
+ oneDeploy(webPackage, queryParameters) {
511
+ return __awaiter(this, void 0, void 0, function* () {
512
+ let httpRequest = new webClient.WebRequest();
513
+ httpRequest.method = 'POST';
514
+ httpRequest.uri = this._client.getRequestUri(`/api/publish`, queryParameters);
515
+ httpRequest.body = fs.createReadStream(webPackage);
516
+ let requestOptions = new webClient.WebRequestOptions();
517
+ //Bydefault webclient.sendRequest retries for [500, 502, 503, 504]
518
+ requestOptions.retriableStatusCodes = [500, 502, 503, 504];
519
+ requestOptions.retryIntervalInSeconds = 5;
520
+ try {
521
+ let response = yield this._client.beginRequest(httpRequest, requestOptions, 'application/octet-stream');
522
+ tl.debug(`OneDeploy response: ${JSON.stringify(response)}`);
523
+ if (response.statusCode == 200) {
524
+ tl.debug('Deployment passed');
525
+ return null;
526
+ }
527
+ else if (response.statusCode == 202) {
528
+ let pollableURL = response.headers.location;
529
+ if (!!pollableURL) {
530
+ tl.debug(`Polling for OneDeploy URL: ${pollableURL}`);
531
+ return yield this._getDeploymentDetailsFromPollURL(pollableURL);
532
+ }
533
+ else {
534
+ tl.debug('OneDeploy returned 202 without pollable URL.');
535
+ return null;
536
+ }
537
+ }
538
+ else {
539
+ throw response;
540
+ }
541
+ }
542
+ catch (error) {
543
+ throw new Error(tl.loc('PackageDeploymentFailed', this._getFormattedError(error)));
544
+ }
545
+ });
546
+ }
510
547
  getDeploymentDetails(deploymentID) {
511
548
  return __awaiter(this, void 0, void 0, function* () {
512
549
  try {
@@ -522,6 +522,41 @@ export class Kudu {
522
522
  }
523
523
  }
524
524
 
525
+ public async oneDeploy(webPackage: string, queryParameters?: Array<string>): Promise<any> {
526
+ let httpRequest = new webClient.WebRequest();
527
+ httpRequest.method = 'POST';
528
+ httpRequest.uri = this._client.getRequestUri(`/api/publish`, queryParameters);
529
+ httpRequest.body = fs.createReadStream(webPackage);
530
+ let requestOptions = new webClient.WebRequestOptions();
531
+ //Bydefault webclient.sendRequest retries for [500, 502, 503, 504]
532
+ requestOptions.retriableStatusCodes = [500, 502, 503, 504];
533
+ requestOptions.retryIntervalInSeconds = 5;
534
+ try {
535
+ let response = await this._client.beginRequest(httpRequest, requestOptions, 'application/octet-stream');
536
+ tl.debug(`OneDeploy response: ${JSON.stringify(response)}`);
537
+ if (response.statusCode == 200) {
538
+ tl.debug('Deployment passed');
539
+ return null;
540
+ }
541
+ else if (response.statusCode == 202) {
542
+ let pollableURL: string = response.headers.location;
543
+ if (!!pollableURL) {
544
+ tl.debug(`Polling for OneDeploy URL: ${pollableURL}`);
545
+ return await this._getDeploymentDetailsFromPollURL(pollableURL);
546
+ }
547
+ else {
548
+ tl.debug('OneDeploy returned 202 without pollable URL.');
549
+ return null;
550
+ }
551
+ }
552
+ else {
553
+ throw response;
554
+ }
555
+ }
556
+ catch (error) {
557
+ throw new Error(tl.loc('PackageDeploymentFailed', this._getFormattedError(error)));
558
+ }
559
+ }
525
560
 
526
561
  public async getDeploymentDetails(deploymentID: string): Promise<any> {
527
562
  try {
@@ -648,4 +683,4 @@ export class Kudu {
648
683
  }
649
684
  return error;
650
685
  }
651
- }
686
+ }
@@ -12,6 +12,7 @@ export declare class KuduServiceUtility {
12
12
  deployUsingWarDeploy(packagePath: string, customMessage?: any, targetFolderName?: any): Promise<string>;
13
13
  postZipDeployOperation(oldDeploymentID: string, activeDeploymentID: string): Promise<void>;
14
14
  warmpUp(): Promise<void>;
15
+ deployUsingOneDeploy(packagePath: string, customMessage?: any, targetPath?: any, type?: any, clean?: any, restart?: any): Promise<string>;
15
16
  private _processDeploymentResponse;
16
17
  private _printZipDeployLogs;
17
18
  private _printPostDeploymentLogs;
@@ -21,6 +21,7 @@ const physicalRootPath = '/site/wwwroot';
21
21
  const deploymentFolder = 'site/deployments';
22
22
  const manifestFileName = 'manifest';
23
23
  const VSTS_ZIP_DEPLOY = 'VSTS_ZIP_DEPLOY';
24
+ const VSTS_ONE_DEPLOY = 'VSTS_ONE_DEPLOY';
24
25
  const VSTS_DEPLOY = 'VSTS';
25
26
  class KuduServiceUtility {
26
27
  constructor(kuduService) {
@@ -190,6 +191,40 @@ class KuduServiceUtility {
190
191
  }
191
192
  });
192
193
  }
194
+ deployUsingOneDeploy(packagePath, customMessage, targetPath, type, clean, restart) {
195
+ return __awaiter(this, void 0, void 0, function* () {
196
+ try {
197
+ console.log(tl.loc('Package deployment using OneDeploy initiated.'));
198
+ let queryParameters = [
199
+ 'async=true',
200
+ 'deployer=' + VSTS_ONE_DEPLOY
201
+ ];
202
+ if (type) {
203
+ queryParameters.push('type=' + encodeURIComponent(type));
204
+ }
205
+ if (targetPath) {
206
+ queryParameters.push('path=' + encodeURIComponent(targetPath));
207
+ }
208
+ if (clean) {
209
+ queryParameters.push('clean=' + encodeURIComponent(clean));
210
+ }
211
+ if (restart) {
212
+ queryParameters.push('restart=' + encodeURIComponent(restart));
213
+ }
214
+ var deploymentMessage = this._getUpdateHistoryRequest(null, null, customMessage).message;
215
+ queryParameters.push('message=' + encodeURIComponent(deploymentMessage));
216
+ let deploymentDetails = yield this._appServiceKuduService.oneDeploy(packagePath, queryParameters);
217
+ console.log(tl.loc(deploymentDetails));
218
+ yield this._processDeploymentResponse(deploymentDetails);
219
+ console.log(tl.loc('Successfully deployed web package to App Service.'));
220
+ return deploymentDetails.id;
221
+ }
222
+ catch (error) {
223
+ tl.error(tl.loc('PackageDeploymentFailed'));
224
+ throw error;
225
+ }
226
+ });
227
+ }
193
228
  _processDeploymentResponse(deploymentDetails) {
194
229
  return __awaiter(this, void 0, void 0, function* () {
195
230
  try {
@@ -14,6 +14,7 @@ const physicalRootPath: string = '/site/wwwroot';
14
14
  const deploymentFolder: string = 'site/deployments';
15
15
  const manifestFileName: string = 'manifest';
16
16
  const VSTS_ZIP_DEPLOY: string = 'VSTS_ZIP_DEPLOY';
17
+ const VSTS_ONE_DEPLOY: string = 'VSTS_ONE_DEPLOY';
17
18
  const VSTS_DEPLOY: string = 'VSTS';
18
19
 
19
20
  export class KuduServiceUtility {
@@ -196,6 +197,45 @@ export class KuduServiceUtility {
196
197
  }
197
198
  }
198
199
 
200
+ public async deployUsingOneDeploy(packagePath: string, customMessage?: any, targetPath?: any, type?: any, clean?: any, restart?: any): Promise<string> {
201
+ try {
202
+ console.log(tl.loc('Package deployment using OneDeploy initiated.'));
203
+ let queryParameters: Array<string> = [
204
+ 'async=true',
205
+ 'deployer=' + VSTS_ONE_DEPLOY
206
+ ];
207
+
208
+ if (type) {
209
+ queryParameters.push('type=' + encodeURIComponent(type));
210
+ }
211
+
212
+ if (targetPath) {
213
+ queryParameters.push('path=' + encodeURIComponent(targetPath));
214
+ }
215
+
216
+ if (clean) {
217
+ queryParameters.push('clean=' + encodeURIComponent(clean));
218
+ }
219
+
220
+ if (restart) {
221
+ queryParameters.push('restart=' + encodeURIComponent(restart));
222
+ }
223
+
224
+ var deploymentMessage = this._getUpdateHistoryRequest(null, null, customMessage).message;
225
+ queryParameters.push('message=' + encodeURIComponent(deploymentMessage));
226
+ let deploymentDetails = await this._appServiceKuduService.oneDeploy(packagePath, queryParameters);
227
+ console.log(tl.loc(deploymentDetails));
228
+ await this._processDeploymentResponse(deploymentDetails);
229
+ console.log(tl.loc('Successfully deployed web package to App Service.'));
230
+
231
+ return deploymentDetails.id;
232
+ }
233
+ catch (error) {
234
+ tl.error(tl.loc('PackageDeploymentFailed'));
235
+ throw error;
236
+ }
237
+ }
238
+
199
239
  private async _processDeploymentResponse(deploymentDetails: any): Promise<void> {
200
240
  try {
201
241
  var kuduDeploymentDetails = await this._appServiceKuduService.getDeploymentDetails(deploymentDetails.id);
@@ -456,4 +496,4 @@ export class KuduServiceUtility {
456
496
  deployer : 'VSTS'
457
497
  };
458
498
  }
459
- }
499
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azure-pipelines-tasks-azurermdeploycommon",
3
- "version": "3.236.0",
3
+ "version": "3.241.0",
4
4
  "description": "Common Lib for Azure ARM REST apis",
5
5
  "repository": {
6
6
  "type": "git",