You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebAppTests/TestPublishWebAppFromWar.json
Copy file name to clipboardExpand all lines: src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebAppTests/TestPublishWebAppFromZip.json
Copy file name to clipboardExpand all lines: src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebAppTests/TestPublishWebAppOneDeploy.json
Copy file name to clipboardExpand all lines: src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebAppTests/TestPublishWebAppOneDeployPullWithMSI.json
@@ -40,10 +41,12 @@ public class PublishAzureWebAppCmdlet : WebAppOptionalSlotBaseCmdlet
40
41
// Poll status for a maximum of 35 minutes (2100 seconds / 2 seconds per status check)
41
42
privateconstintNumStatusChecks=1050;
42
43
43
-
[Parameter(Mandatory=true,HelpMessage="The path of the archive file. ZIP, WAR, and JAR are supported.")]
44
-
[ValidateNotNullOrEmpty]
44
+
[Parameter(Mandatory=false,HelpMessage="The path of the archive file. ZIP, WAR, and JAR are supported.")]
45
45
publicstringArchivePath{get;set;}
46
46
47
+
[Parameter(Mandatory=false,HelpMessage="URL of the artifact. The webapp will pull the artifact from this URL. Ex: \"http://mysite.com/files/myapp.war")]
48
+
publicstringArchiveURL{get;set;}
49
+
47
50
[Parameter(Mandatory=false,HelpMessage="Used to override the type of artifact being deployed.")]
48
51
[ValidateSet("war","jar","ear","zip","static")]
49
52
publicstringType{get;set;}
@@ -60,6 +63,9 @@ public class PublishAzureWebAppCmdlet : WebAppOptionalSlotBaseCmdlet
60
63
[Parameter(Mandatory=false,HelpMessage="Absolute path that the artifact should be deployed to.")]
61
64
publicstringTargetPath{get;set;}
62
65
66
+
[Parameter(Mandatory=false,HelpMessage="AAD identity used for pull based deployments. 'system' will use the app's system assigned identity. An user assigned identity can be used by providing the client ID. Only available for Windows WebApps. Support for Linux WebApps coming soon.")]
67
+
publicstringPullIdentity{get;set;}
68
+
63
69
[Parameter(Mandatory=false,HelpMessage="Disables any language-specific defaults")]
64
70
publicSwitchParameterIgnoreStack{get;set;}
65
71
@@ -81,6 +87,9 @@ public override void ExecuteCmdlet()
varrec=newErrorRecord(newException("Deployment type is mandatory when deploying from URLs. Use -type"),string.Empty,ErrorCategory.InvalidArgument,null);
varrec=newErrorRecord(newException("Could not find artifact source"),string.Empty,ErrorCategory.InvalidArgument,null);
228
+
WriteError(rec);
229
+
return;
230
+
}
177
231
178
232
// Checking the response of the post request. If the post request fails with 502 or 503 HTTP status
179
233
// then deployments/latest endpoint may give false postive result.
@@ -207,7 +261,6 @@ public override void ExecuteCmdlet()
207
261
208
262
ConfirmAction(this.Force.IsPresent,$"Contents of {ArchivePath} will be deployed to the web app {Name}.","The web app has been deployed.",Name,zipDeployAction);
AAD identity used for pull based deployments. 'system' will use the app's system assigned identy. An user assigned identity can be used by providing the client ID. Only available for Windows WebApps. Support for Linux WebApps coming soon.
0 commit comments