Skip to content

Commit 9626058

Browse files
authored
Merge pull request #4175 from Microsoft/users/padepu/azureWebAppLinuxVersionFix
Updating the LinuxFxVersion setting in webapp config
2 parents cb6f695 + 883eec0 commit 9626058

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

Tasks/AzureRmWebAppDeployment/azurermwebappcontainerdeployment.ts

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,26 @@ export async function deployWebAppImage(endPoint, resourceGroupName, webAppName)
2323
if(imageSourceAndTag)
2424
{
2525
tl.debug("Deploying the image " + imageSourceAndTag + " to the webapp " + webAppName);
26-
26+
27+
tl.debug("Updating the webapp configuration.")
28+
var updatedConfigDetails = JSON.stringify({
29+
"properties": {
30+
"appCommandLine": startupCommand,
31+
"linuxFxVersion": "DOCKER|" + imageSourceAndTag
32+
}
33+
});
34+
35+
await azureRESTUtility.updateAzureRMWebAppConfigDetails(endPoint, webAppName, resourceGroupName, false, null, updatedConfigDetails);
36+
37+
tl.debug("Updating the webapp application settings.")
2738
appSettings = appSettings ? appSettings.trim() : "";
2839
appSettings = "-DOCKER_CUSTOM_IMAGE_NAME " + imageSourceAndTag + " " + appSettings;
29-
40+
3041
// Update webapp application setting
3142
var webAppSettings = await azureRESTUtility.getWebAppAppSettings(endPoint, webAppName, resourceGroupName, false, null);
3243
mergeAppSettings(appSettings, webAppSettings);
3344
await azureRESTUtility.updateWebAppAppSettings(endPoint, webAppName, resourceGroupName, false, null, webAppSettings);
34-
35-
// Update startup command
36-
if(startupCommand)
37-
{
38-
tl.debug("Updating the startup command: " + startupCommand);
39-
var updatedConfigDetails = JSON.stringify(
40-
{
41-
"properties": {
42-
"appCommandLine": startupCommand
43-
}
44-
});
45-
46-
await azureRESTUtility.updateAzureRMWebAppConfigDetails(endPoint, webAppName, resourceGroupName, false, null, updatedConfigDetails);
47-
}
48-
}
45+
}
4946
}
5047

5148
function mergeAppSettings(appSettings, webAppSettings) {

Tasks/AzureRmWebAppDeployment/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"version": {
1717
"Major": 3,
1818
"Minor": 3,
19-
"Patch": 0
19+
"Patch": 1
2020
},
2121
"releaseNotes": "What's new in Version 3.0: <br/>&nbsp;&nbsp;Supports File Transformations (XDT) <br/>&nbsp;&nbsp;Supports Variable Substitutions(XML, JSON) <br/>Click [here](https://aka.ms/azurermwebdeployreadme) for more Information.",
2222
"minimumAgentVersion": "2.104.1",

Tasks/AzureRmWebAppDeployment/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"version": {
1717
"Major": 3,
1818
"Minor": 3,
19-
"Patch": 0
19+
"Patch": 1
2020
},
2121
"releaseNotes": "What's new in Version 3.0: <br/>&nbsp;&nbsp;Supports File Transformations (XDT) <br/>&nbsp;&nbsp;Supports Variable Substitutions(XML, JSON) <br/>Click [here](https://aka.ms/azurermwebdeployreadme) for more Information.",
2222
"minimumAgentVersion": "2.104.1",

0 commit comments

Comments
 (0)