Примечание
Для доступа к этой странице требуется авторизация. Вы можете попробовать войти или изменить каталоги.
Для доступа к этой странице требуется авторизация. Вы можете попробовать изменить каталоги.
задания развертывания — это особый тип задания. Это коллекция шагов для последовательного выполнения в среде.
jobs:
- deployment: string # Required as first property. Name of the deployment job, A-Z, a-z, 0-9, and underscore. The word deploy is a keyword and is unsupported as the deployment name.
displayName: string # Human-readable name for the deployment.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this deployment.
continueOnError: string # Continue running even on failure?
timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
variables: variables | [ variable ] # Deployment-specific variables.
pool: string | pool # Pool where this job will run.
environment: string | environment # Target environment name and optionally a resource name to record the deployment history; format: environment-name.resource-name.
strategy: strategy # Execution strategy for this deployment.
workspace: # Workspace options on the agent.
clean: outputs | resources | all # What to clean up before the job runs.
uses: # Any resources required by this job that are not already referenced.
repositories: [ string ] # Repository references.
pools: [ string ] # Pool references.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
string: string # Name/value pairs
templateContext: # Deployment related information passed from a pipeline when extending a template.
jobs:
- deployment: string # Required as first property. Name of the deployment job, A-Z, a-z, 0-9, and underscore. The word deploy is a keyword and is unsupported as the deployment name.
displayName: string # Human-readable name for the deployment.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this deployment.
continueOnError: string # Continue running even on failure?
timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
variables: variables | [ variable ] # Deployment-specific variables.
pool: string | pool # Pool where this job will run.
environment: string | environment # Target environment name and optionally a resource name to record the deployment history; format: environment-name.resource-name.
strategy: strategy # Execution strategy for this deployment.
workspace: # Workspace options on the agent.
clean: outputs | resources | all # What to clean up before the job runs.
uses: # Any resources required by this job that are not already referenced.
repositories: [ string ] # Repository references.
pools: [ string ] # Pool references.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
string: string # Name/value pairs
jobs:
- deployment: string # Required as first property. Name of the deployment job, A-Z, a-z, 0-9, and underscore. The word deploy is a keyword and is unsupported as the deployment name.
displayName: string # Human-readable name for the deployment.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this deployment.
continueOnError: string # Continue running even on failure?
timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
variables: variables | [ variable ] # Deployment-specific variables.
pool: string | pool # Pool where this job will run.
environment: string | environment # Target environment name and optionally a resource name to record the deployment history; format: environment-name.resource-name.
strategy: strategy # Execution strategy for this deployment.
workspace: # Workspace options on the agent.
clean: outputs | resources | all # What to clean up before the job runs.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
string: string # Name/value pairs
Определения, ссылающиеся на это определение: задания
Свойства
строка deployment
. Обязательный в качестве первого свойства.
Имя задания развертывания, A-Z, a-z, 0-9 и подчеркивание. Развертывание слова является ключевым словом и не поддерживается в качестве имени развертывания.
строка displayName
.
имя, доступное для чтения пользователем для развертывания.
строка dependsOn
| строковый список.
Все задания, которые должны выполняться до этого.
строка condition
.
оценить это выражение условия, чтобы определить, следует ли запускать это развертывание.
строка continueOnError
.
Продолжить работу даже при сбое?
строка timeoutInMinutes
.
время ожидания завершения этого задания до того, как сервер убьет его.
строка cancelTimeoutInMinutes
.
Время, чтобы дождаться отмены задания, прежде чем принудительно завершать его.
variables
переменных.
переменные, относящиеся к развертыванию.
pool
пула.
пул, где будет выполняться это задание.
environment
jobs.deployment.environment.
имя целевой среды и необязательно имя ресурса для записи журнала развертывания; формат: environment-name.resource-name.
strategy
jobs.deployment.strategy.
стратегия выполнения для этого развертывания.
workspace
рабочей области.
параметры рабочей области агента.
Дополнительные сведения о рабочих областях, включая чистые параметры, см. в разделе рабочей областизаданиях.
uses
jobs.job.use.
Указывает ресурсы, необходимые для этого задания, которые еще не ссылаются в другом месте конвейера, например на шаг выхода или ресурс репозитория. Дополнительные сведения см. в uses
разделе "Ограничение области авторизации задания" и инструкции "using" для предварительного объявления ресурсов.
container
job.job.container.
имя ресурса контейнера.
services
словарь строк.
ресурсы контейнеров для запуска в качестве контейнера службы.
templateContext
templateContext.
сведения о развертывании, передаваемые из конвейера при расширении шаблона. Дополнительные сведения см. в примечаниях. Дополнительные сведения о templateContext
см. в статье Расширенные шаблоны конвейеров YAML теперь можно передавать сведения о контексте для этапов, заданий и развертываний и шаблонов. Используйте templateContext для передачи свойств в шаблоны.
Замечания
В конвейерах YAML команда конвейеров рекомендует поместить шаги развертывания в задание развертывания.
Дополнительные сведения о templateContext
см. в статье Расширенные шаблоны конвейеров YAML теперь можно передавать сведения о контексте для этапов, заданий и развертываний и шаблонов. Используйте templateContext для передачи свойств в шаблоны.
Примеры
jobs:
# track deployments on the environment
- deployment: DeployWeb
displayName: deploy Web App
pool:
vmImage: ubuntu-latest
# creates an environment if it doesn't exist
environment: 'smarthotel-dev'
strategy:
# default deployment strategy, more coming...
runOnce:
deploy:
steps:
- script: echo my first deployment