共用方式為


az functionapp deployment source

Note

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

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

命令

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

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

Core GA
az functionapp deployment source config-local-git

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

Core GA
az functionapp deployment source config-zip

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

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

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

Extension GA
az functionapp deployment source delete

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

Core GA
az functionapp deployment source show

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

Core GA
az functionapp deployment source sync

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

Core GA
az functionapp deployment source update-token

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

Core GA

az functionapp deployment source config

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

請注意,GitHub 動作密碼現在會在結果中修訂。 請使用 az webapp 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 存放庫管理部署。 (autogenerated)

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 或其他「資源識別碼」自變數。

屬性
參數群組: Resource Id Arguments
--manual-integration

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

--name -n

函式應用程式的名稱。

屬性
參數群組: Resource Id Arguments
--repository-type

存放庫類型。

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

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

屬性
參數群組: Resource Id Arguments
--slot -s

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

--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

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 或其他「資源識別碼」自變數。

屬性
參數群組: Resource Id Arguments
--name -n

函式應用程式的名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--slot -s

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

--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

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
--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

函式應用程式的名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--slot -s

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

--subscription

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

屬性
參數群組: Resource Id Arguments
--timeout -t

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

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
接受的值: false, true
--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

函式應用程式的名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--slot -s

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

--subscription

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

屬性
參數群組: Resource Id Arguments
--timeout -t

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az functionapp deployment source delete

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

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

範例

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

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

函式應用程式的名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--slot -s

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

--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az functionapp deployment source show

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

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

範例

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

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

函式應用程式的名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--slot -s

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

--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az functionapp deployment source sync

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

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

範例

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

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

函式應用程式的名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--slot -s

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

--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az functionapp deployment source update-token

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

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

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--git-token

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False