Complete the code to define a pipeline trigger on the main branch.
trigger:
branches:
include:
- [1]The pipeline triggers on the main branch to automate deployment when code changes.
Complete the code to add a build job named 'BuildApp'.
jobs:
- job: [1]
steps:
- script: echo Building the appThe job name BuildApp clearly indicates the build process in the pipeline.
Fix the error in the pipeline step to use the correct task for Azure CLI.
- task: [1] inputs: azureSubscription: 'MyAzureSub' scriptType: 'ps' scriptLocation: 'inlineScript' inlineScript: 'az group list'
The AzureCLI@2 task runs Azure CLI commands in the pipeline.
Fill both blanks to define a deployment job that depends on the build job and runs on Ubuntu.
jobs: - job: DeployApp dependsOn: [1] pool: vmImage: [2] steps: - script: echo Deploying the app
The deployment job depends on the BuildApp job and runs on ubuntu-latest VM image.
Fill all three blanks to create a variable group reference with a secure variable and a script step using it.
variables: - group: [1] - name: secretToken value: $[2] steps: - script: echo Token is [3]
The variable group MyVariableGroup is referenced. The secret variable secretToken is accessed with $(secretToken) syntax in the script.