AZ-400 • Practice Test 49
Free AZ-400 practice test — 15 questions with explanations. Set 49. No signup required.
You are auditing an Azure Pipeline YAML file. The security team requires that deployments to the 'Prod' environment only occur from the main branch. Does this pipeline meet that requirement?
Refer to the exhibit.
```yaml
# azure-pipelines.yml
variables:
- group: ProductionSecrets
- name: environment
value: 'prod'
stages:
- stage: Build
jobs:
- job: BuildJob
steps:
- script: echo Building...
- stage: Deploy
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: DeployJob
environment: Prod
strategy:
runOnce:
deploy:
steps:
- script: echo Deploying...
```