AzureWebAppContainer@1 - 適用於容器的 Azure Web 應用程式 v1 工作
此工作會將容器部署至 Azure App Service。
語法
# Azure Web App for Containers v1
# Deploy containers to Azure App Service.
- task: AzureWebAppContainer@1
inputs:
azureSubscription: # string. Required. Azure subscription.
appName: # string. Required. App name.
#deployToSlotOrASE: false # boolean. Deploy to Slot or App Service Environment. Default: false.
#resourceGroupName: # string. Required when deployToSlotOrASE = true. Resource group.
#slotName: 'production' # string. Required when deployToSlotOrASE = true. Slot. Default: production.
#containers: # string. Alias: imageName. Image name.
#multicontainerConfigFile: # string. Configuration File.
#containerCommand: # string. Startup command.
# Application and Configuration Settings
#appSettings: # string. App settings.
#configurationStrings: # string. Configuration settings.
輸入
appName
-
應用程式名稱
string
。 必須的。
指定現有 Azure App Service 的名稱。 只會列出以所選應用程式類型為基礎的應用程式服務。
deployToSlotOrASE
-
部署至位置或 App Service 環境
boolean
。 預設值:false
。
選取選項以部署至現有的部署位置或 Azure App Service 環境。
針對這兩個目標,工作需要資源組名。
如果部署目標為位置,則預設值為生產位置。 您也可以提供任何其他現有的位置名稱。
如果部署目標為 Azure App Service 環境,請將位置名稱保留為 production
,並指定資源組名。
resourceGroupName
-
資源群組
string
。
deployToSlotOrASE = true
時為必要項。
當部署目標為部署位置或 Azure App Service 環境時,需要資源組名。
指定包含上述 Azure App Service 的 Azure 資源群組。
slotName
-
位置
string
。
deployToSlotOrASE = true
時為必要項。 預設值:production
。
指定現有的位置,不包括生產位置。
containers
-
映射名稱
輸入別名:imageName
。
string
。
指定完整容器映像名稱。 例如,myregistry.azurecr.io/nginx:latest 或 python:3.7.2-alpine/.
針對多容器案例,可以提供多個容器映像名稱。
multicontainerConfigFile
-
組態檔
string
。
Docker-Compose 檔案的路徑。 必須是完整路徑或相對於預設工作目錄的路徑。
containerCommand
-
啟動命令
string
。
指定啟動命令。
例如:
dotnet run
dotnet filename.dll
appSettings
-
應用程式設定
string
。
使用語法 -key 值編輯 Web 應用程式應用程式設定(例如:-Port 5000
-RequestTimeout 5000
-WEBSITE_TIME_ZONE
)。 包含空格的值應該以雙引弧括住(例如:"Eastern Standard Time"
)。
configurationStrings
-
組態設定
string
。
使用語法 -key 值編輯 Web 應用程式應用程式設定(例如:-phpVersion 5.6 -linuxFxVersion: node|6.11
)。 包含空格的值應該以雙引號括住。
工作控制選項
除了工作輸入之外,所有工作都有控制選項。 如需詳細資訊,請參閱 控制項選項和一般工作屬性。
輸出變數
此工作會定義下列 輸出變數,您可以在下游步驟、作業和階段中取用這些變數。
AppServiceApplicationUrl
所選 Azure App Service 的應用程式 URL。
需求
要求 | 說明 |
---|---|
管線類型 | YAML、傳統組建、傳統版本 |
執行於 | Agent、DeploymentGroup |
需求 | 沒有 |
功能 | 此工作不符合作業中後續工作的任何需求。 |
命令限制 | 任意 |
Settable 變數 | 任意 |
代理程式版本 | 2.104.1 或更高版本 |
工作類別 | 部署 |