azure-pipelines-tasks-azurermdeploycommon 3.221.3 → 3.222.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/azure-arm-rest/azure-arm-app-service.js +1 -1
- package/azure-arm-rest/azure-arm-app-service.ts +1 -1
- package/operations/ContainerBasedDeploymentUtility.d.ts +1 -1
- package/operations/ContainerBasedDeploymentUtility.js +5 -3
- package/operations/ContainerBasedDeploymentUtility.ts +5 -3
- package/package.json +1 -1
|
@@ -349,7 +349,7 @@ class AzureAppService {
|
|
|
349
349
|
'{name}': this._name,
|
|
350
350
|
}, null, '2018-02-01');
|
|
351
351
|
var response = yield this._client.beginRequest(httpRequest);
|
|
352
|
-
if (response.statusCode != 200) {
|
|
352
|
+
if (response.statusCode != 200 && response.statusCode != 202) {
|
|
353
353
|
throw AzureServiceClient_1.ToError(response);
|
|
354
354
|
}
|
|
355
355
|
return response.body;
|
|
@@ -378,7 +378,7 @@ export class AzureAppService {
|
|
|
378
378
|
}, null, '2018-02-01');
|
|
379
379
|
|
|
380
380
|
var response = await this._client.beginRequest(httpRequest);
|
|
381
|
-
if(response.statusCode != 200) {
|
|
381
|
+
if(response.statusCode != 200 && response.statusCode != 202) {
|
|
382
382
|
throw ToError(response);
|
|
383
383
|
}
|
|
384
384
|
|
|
@@ -3,7 +3,7 @@ export declare class ContainerBasedDeploymentUtility {
|
|
|
3
3
|
private _appService;
|
|
4
4
|
private _appServiceUtility;
|
|
5
5
|
constructor(appService: AzureAppService);
|
|
6
|
-
deployWebAppImage(properties: any): Promise<void>;
|
|
6
|
+
deployWebAppImage(properties: any, restart?: boolean): Promise<void>;
|
|
7
7
|
private _updateConfigurationDetails;
|
|
8
8
|
private _getAzureContainerImageName;
|
|
9
9
|
private _getDockerHubImageName;
|
|
@@ -29,7 +29,7 @@ class ContainerBasedDeploymentUtility {
|
|
|
29
29
|
this._appService = appService;
|
|
30
30
|
this._appServiceUtility = new AzureAppServiceUtility_1.AzureAppServiceUtility(appService);
|
|
31
31
|
}
|
|
32
|
-
deployWebAppImage(properties) {
|
|
32
|
+
deployWebAppImage(properties, restart = true) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
34
|
let imageName = properties["ImageName"];
|
|
35
35
|
let multicontainerConfigFile = properties["MulticontainerConfigFile"];
|
|
@@ -49,8 +49,10 @@ class ContainerBasedDeploymentUtility {
|
|
|
49
49
|
}
|
|
50
50
|
tl.debug("Updating the webapp configuration.");
|
|
51
51
|
yield this._updateConfigurationDetails(properties["ConfigurationSettings"], properties["StartupCommand"], isLinuxApp, imageName, isMultiContainer, updatedMulticontainerConfigFile);
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
if (restart) {
|
|
53
|
+
tl.debug('making a restart request to app service');
|
|
54
|
+
yield this._appService.restart();
|
|
55
|
+
}
|
|
54
56
|
});
|
|
55
57
|
}
|
|
56
58
|
_updateConfigurationDetails(configSettings, startupCommand, isLinuxApp, imageName, isMultiContainer, multicontainerConfigFile) {
|
|
@@ -23,7 +23,7 @@ export class ContainerBasedDeploymentUtility {
|
|
|
23
23
|
this._appServiceUtility = new AzureAppServiceUtility(appService);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
public async deployWebAppImage(properties: any): Promise<void> {
|
|
26
|
+
public async deployWebAppImage(properties: any, restart: boolean = true): Promise<void> {
|
|
27
27
|
let imageName: string = properties["ImageName"];
|
|
28
28
|
let multicontainerConfigFile: string = properties["MulticontainerConfigFile"];
|
|
29
29
|
let isMultiContainer: boolean = properties["isMultiContainer"];
|
|
@@ -46,8 +46,10 @@ export class ContainerBasedDeploymentUtility {
|
|
|
46
46
|
tl.debug("Updating the webapp configuration.");
|
|
47
47
|
await this._updateConfigurationDetails(properties["ConfigurationSettings"], properties["StartupCommand"], isLinuxApp, imageName, isMultiContainer, updatedMulticontainerConfigFile);
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
if (restart) {
|
|
50
|
+
tl.debug('making a restart request to app service');
|
|
51
|
+
await this._appService.restart();
|
|
52
|
+
}
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
private async _updateConfigurationDetails(configSettings: any, startupCommand: string, isLinuxApp: boolean, imageName?: string, isMultiContainer?: boolean, multicontainerConfigFile?: string): Promise<void> {
|