Complete the code to define a release pipeline stage in Azure DevOps.
stages:
- stage: [1]
jobs:
- job: Build
steps:
- script: echo Building...The stage name defines a phase in the release pipeline. Here, Build is the correct stage name for the build job.
Complete the code to specify the trigger for the release pipeline.
trigger:
branches:
include:
- [1]include.The trigger defines which branch starts the pipeline. Usually, main is the primary branch for releases.
Fix the error in the deployment job to correctly specify the agent pool.
jobs:
- deployment: DeployWeb
pool:
vmImage: [1]
environment: 'production'
strategy:
runOnce:
deploy:
steps:
- script: echo Deploying...The vmImage specifies the OS image for the agent. ubuntu-latest is a valid and common choice for deployment jobs.
Fill both blanks to define a job with a script step that runs a deployment command.
jobs: - job: Deploy steps: - script: [1] [2]
The Azure CLI command az deploy is used to run deployment scripts in pipelines.
Fill all three blanks to create a release pipeline variable group reference with a secret variable.
variables: - group: [1] - name: [2] value: [3] isSecret: true
The variable group ProdSecrets holds secret variables. API_KEY is the variable name, and $(mySecretValue) references the secret value securely.