Skip to content

Commit 09c297f

Browse files
seligj95Copilot
andcommitted
[App Service] Improve az webapp deploy parameter documentation (#29759, #29758, #29561, #30110)
- Add default timeout value to --timeout help text - Clarify --acr-use-identity default behavior - Document --track-status behavior and parameter relationships - Add more examples to az webapp deploy help (URL deploy, slots, --clean) Fixes #29759 Fixes #29758 Fixes #29561 Fixes #30110 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent dc9fdb3 commit 09c297f

2 files changed

Lines changed: 23 additions & 8 deletions

File tree

src/azure-cli/azure/cli/command_modules/appservice/_help.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3287,9 +3287,24 @@
32873287
helps['webapp deploy'] = """
32883288
type: command
32893289
short-summary: Deploys a provided artifact to Azure Web Apps.
3290+
long-summary: |
3291+
Supports deploying from local files (--src-path) or remote URLs (--src-url).
3292+
When --track-status is enabled (the default for Linux web apps), the command monitors
3293+
application startup after deployment by polling health endpoints. If the app fails to
3294+
start within the expected window, the command returns a non-zero exit code. Use
3295+
--async false together with --track-status true to wait for full deployment completion
3296+
before tracking begins.
32903297
examples:
3291-
- name: Deploy a war file asynchronously.
3292-
text: az webapp deploy --resource-group ResourceGroup --name AppName --src-path SourcePath --type war --async true
3293-
- name: Deploy a static text file to wwwroot/staticfiles/test.txt
3294-
text: az webapp deploy --resource-group ResourceGroup --name AppName --src-path SourcePath --type static --target-path staticfiles/test.txt
3298+
- name: Deploy a war file asynchronously from local path.
3299+
text: az webapp deploy --resource-group ResourceGroup --name AppName --src-path app.war --type war --async true
3300+
- name: Deploy a zip file from a remote URL.
3301+
text: az webapp deploy --resource-group ResourceGroup --name AppName --src-url https://example.com/app.zip
3302+
- name: Deploy without cleaning the target directory.
3303+
text: az webapp deploy --resource-group ResourceGroup --name AppName --src-path app.zip --clean false
3304+
- name: Deploy with runtime status tracking for Linux web app.
3305+
text: az webapp deploy --resource-group ResourceGroup --name AppName --src-path app.zip --track-status true --async false
3306+
- name: Deploy to a specific slot.
3307+
text: az webapp deploy --resource-group ResourceGroup --name AppName --src-path app.jar --type jar --slot staging
3308+
- name: Deploy a static text file to a custom path.
3309+
text: az webapp deploy --resource-group ResourceGroup --name AppName --src-path file.txt --type static --target-path staticfiles/file.txt
32953310
"""

src/azure-cli/azure/cli/command_modules/appservice/_params.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def load_arguments(self, _):
591591
c.ignore('reserved_instance_count')
592592
c.argument('runtime', help="Canonicalized web runtime in the format of Framework:Version, e.g. \"PHP:7.2\"."
593593
"Use `az webapp list-runtimes` for available list")
594-
c.argument('acr_use_identity', arg_type=get_three_state_flag(return_label=True), help="Enable or disable pull image from acr use managed identity")
594+
c.argument('acr_use_identity', arg_type=get_three_state_flag(return_label=True), help="If not specified, managed identity will not be used for ACR image pull.")
595595
c.argument('acr_identity', help="Accept system or user assigned identity which will be set for acr image pull. "
596596
"Use \'[system]\' to refer system assigned identity, or a resource id to refer user assigned identity.")
597597
c.argument('java_version',
@@ -1007,9 +1007,9 @@ def load_arguments(self, _):
10071007
c.argument('clean', help='If true, cleans the target directory prior to deploying the file(s). Default value is determined based on artifact type.', arg_type=get_three_state_flag())
10081008
c.argument('ignore_stack', help='If true, any stack-specific defaults are ignored.', arg_type=get_three_state_flag())
10091009
c.argument('reset', help='Reset Java apps to the default parking page if set to true with no type specified.', arg_type=get_three_state_flag())
1010-
c.argument('timeout', type=int, help='Timeout for the deployment operation in milliseconds. Ignored when using "--src-url" since synchronous deployments are not yet supported when using "--src-url"')
1011-
c.argument('slot', help="The name of the slot. Default to the productions slot if not specified.")
1012-
c.argument('track_status', help="If true, web app startup status during deployment will be tracked for linux web apps.",
1010+
c.argument('timeout', type=int, help='Timeout for the deployment operation in milliseconds. Default: 900000 (15 minutes). Ignored when using "--src-url".')
1011+
c.argument('slot', help="The name of the slot. Default to the production slot if not specified.")
1012+
c.argument('track_status', help="If not specified, the command will track app startup and runtime health. Default: true.",
10131013
arg_type=get_three_state_flag())
10141014
c.argument('enable_kudu_warmup', help="If true, kudu will be warmed up before performing deployment for a linux webapp.",
10151015
arg_type=get_three_state_flag())

0 commit comments

Comments
 (0)