Knowledge check

Completed

Consider the following pipeline definition and pipeline template:

azure-pipelines.yml:

trigger: none

pool:
  vmImage: ubuntu-latest

stages:

- template: deploy.yml
  parameters:
    environmentName: Sandbox

- template: deploy.yml
  parameters:
    environmentName: Production

deploy.yml:

parameters:
- name: environmentName
  type: string

stages:
- stage: Deploy
  jobs:
  - job: Deploy
    steps:
    - checkout: self
    - task: AzureCLI@2
      name: DeployBicepFile
      displayName: Deploy Bicep file
      inputs:
        azureSubscription: SharedServiceConnection
        scriptType: 'bash'
        scriptLocation: 'inlineScript'
        inlineScript: |
            az deployment group create \
            --name $(Build.BuildNumber) \
            --resource-group ${{parameters.environmentName}}_rg \
            --template-file deploy/main.bicep \
            --parameters deploy/parameters.${{parameters.environmentName}}.json

The Git repository's deploy folder also contains the Bicep file and parameter files.

1.

When you try to run the pipeline, Azure Pipelines gives you an error. What's the most likely cause of the problem?

2.

How can you improve the security of this pipeline?

3.

You need to add a new environment named Integration to the pipeline. Which of these actions should you take as part of adding the new environment?

4.

You need to add a new parameter to your deployment that contains a connection string and password to access a database. Which of these approaches should you consider?