az functionapp deployment source

注意

此命令群組具有 Azure CLI 和至少一個擴充功能中定義的命令。 安裝每個擴充功能以受益於其擴充功能。 深入了解擴充功能。

透過原始檔控制管理函式應用程式部署。

命令

名稱 Description 類型 狀態
az functionapp deployment source config

從 git 或 Mercurial 存放庫管理部署。

核心 GA
az functionapp deployment source config-local-git

取得 Git 存放庫端點的 URL,以複製和推送至函式應用程式部署。

核心 GA
az functionapp deployment source config-zip

使用函式應用程式的 kudu zip 推送部署來執行部署。

核心 GA
az functionapp deployment source config-zip (appservice-kube 擴充功能)

使用函式應用程式的 kudu zip 推送部署來執行部署。

副檔名 GA
az functionapp deployment source delete

刪除原始檔控制部署組態。

核心 GA
az functionapp deployment source show

取得原始檔控制部署設定的詳細數據。

核心 GA
az functionapp deployment source sync

從存放庫同步處理。 只有在手動整合模式下才需要。

核心 GA
az functionapp deployment source update-token

更新 Azure App Service 中快取的原始檔控制令牌。

核心 GA

az functionapp deployment source config

從 git 或 Mercurial 存放庫管理部署。

請注意,GitHub 動作密碼現在會在結果中修訂。 請使用 az functionapp deployment source show 命令來檢視 GitHub 動作密碼。

az functionapp deployment source config --repo-url
                                        [--branch]
                                        [--git-token]
                                        [--github-action]
                                        [--ids]
                                        [--manual-integration]
                                        [--name]
                                        [--repository-type {externalgit, git, github, localgit, mercurial}]
                                        [--resource-group]
                                        [--slot]
                                        [--subscription]

範例

從 git 或 Mercurial 存放庫管理部署。 ( 自動產生 )

az functionapp deployment source config --branch master --manual-integration --name MyFunctionApp --repo-url https://github.com/Azure-Samples/function-image-upload-resize --resource-group MyResourceGroup

必要參數

--repo-url -u

要從提取最新來源的存放庫 URL, 例如 https://github.com/foo/foo-web

選擇性參數

--branch

存放庫的分支名稱。

--git-token

自動同步所需的 Git 存取令牌。

--github-action

如果使用 GitHub 宏指令,則預設為 False。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--manual-integration

停用原始檔控制與 Web 之間的自動同步處理。

--name -n

函式應用程式的名稱。

--repository-type

存放庫類型。

接受的值: externalgit, git, github, localgit, mercurial
預設值: git
--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az functionapp deployment source config-local-git

取得 Git 存放庫端點的 URL,以複製和推送至函式應用程式部署。

az functionapp deployment source config-local-git [--ids]
                                                  [--name]
                                                  [--resource-group]
                                                  [--slot]
                                                  [--subscription]

範例

取得端點,並將其新增為 Git 遠端。

az functionapp deployment source config-local-git \
    -g MyResourceGroup -n MyUniqueApp

git remote add azure \
    https://{deploy_user_name}@MyUniqueApp.scm.azurewebsites.net/MyUniqueApp.git

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

函式應用程式的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az functionapp deployment source config-zip

使用函式應用程式的 kudu zip 推送部署來執行部署。

根據預設,Kudu 假設 zip 部署不需要任何與組建相關的動作,例如 npm 安裝或 dotnet publish。 若要啟用 Kudu 偵測邏輯和建置腳本產生程式,您可以在 zip 檔案中包含下列內容 '[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true',以覆寫此檔案。 請參閱 https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview。 或者,您可以使用 az functionapp config appsettings set 命令來啟用設定。

az functionapp deployment source config-zip --src
                                            [--build-remote {false, true}]
                                            [--ids]
                                            [--name]
                                            [--resource-group]
                                            [--slot]
                                            [--subscription]
                                            [--timeout]

範例

使用 zip 檔案內容執行部署。

az functionapp deployment source config-zip \
    -g {myRG} -n {myAppName} \
    --src {zipFilePathLocation}

必要參數

--src

部署的 zip 檔案路徑。

選擇性參數

--build-remote

在部署期間啟用遠端建置。

接受的值: false, true
預設值: False
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

函式應用程式的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--timeout -t

可設定的逾時,以秒為單位來檢查部署狀態。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az functionapp deployment source config-zip (appservice-kube 擴充功能)

使用函式應用程式的 kudu zip 推送部署來執行部署。

根據預設,Kudu 假設 zip 部署不需要任何與組建相關的動作,例如 npm 安裝或 dotnet publish。 若要啟用 Kudu 偵測邏輯和建置腳本產生程式,您可以在 zip 檔案中包含下列內容 '[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true',以覆寫此檔案。 請參閱 https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview。 或者,您可以使用 az functionapp config appsettings set 命令來啟用設定。

az functionapp deployment source config-zip --src
                                            [--build-remote {false, true}]
                                            [--ids]
                                            [--name]
                                            [--resource-group]
                                            [--slot]
                                            [--subscription]
                                            [--timeout]

範例

使用 zip 檔案內容執行部署。

az functionapp deployment source config-zip \
    -g {myRG} -n {myAppName} \
    --src {zipFilePathLocation}

必要參數

--src

部署的 zip 檔案路徑。

選擇性參數

--build-remote

在部署期間啟用遠端建置。

接受的值: false, true
預設值: False
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

函式應用程式的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--timeout -t

可設定的逾時,以秒為單位來檢查部署狀態。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az functionapp deployment source delete

刪除原始檔控制部署組態。

az functionapp deployment source delete [--ids]
                                        [--name]
                                        [--resource-group]
                                        [--slot]
                                        [--subscription]

範例

刪除原始檔控制部署組態。 ( 自動產生 )

az functionapp deployment source delete --name MyFunctionApp --resource-group MyResourceGroup

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

函式應用程式的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az functionapp deployment source show

取得原始檔控制部署設定的詳細數據。

az functionapp deployment source show [--ids]
                                      [--name]
                                      [--resource-group]
                                      [--slot]
                                      [--subscription]

範例

取得原始檔控制部署設定的詳細數據。 ( 自動產生 )

az functionapp deployment source show --name MyFunctionApp --resource-group MyResourceGroup

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

函式應用程式的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az functionapp deployment source sync

從存放庫同步處理。 只有在手動整合模式下才需要。

az functionapp deployment source sync [--ids]
                                      [--name]
                                      [--resource-group]
                                      [--slot]
                                      [--subscription]

範例

從存放庫同步處理。 只有在手動整合模式下才需要。 ( 自動產生 )

az functionapp deployment source sync --name MyFunctionApp --resource-group MyResourceGroup

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

函式應用程式的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az functionapp deployment source update-token

更新 Azure App Service 中快取的原始檔控制令牌。

如果未提供令牌,命令將會清除現有的令牌。 請注意,令牌現在會在結果中修訂。

az functionapp deployment source update-token [--git-token]

選擇性參數

--git-token

自動同步所需的 Git 存取令牌。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。