AZ-400 Practice Question: Design and implement build and release pipelines
Network Topology
The exhibit shows an Azure CLI command to run a pipeline. What does this command do?
⚠ Common exam trap
Many candidates confuse the `--variables` parameter with `--secret-variables`, assuming all variables passed at runtime are automatically secured, when in fact Azure CLI requires an explicit flag to treat them as secret.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Runs the pipeline named 'MyPipeline' on the 'main' branch with a variable 'myVar' set to 'value1'.
The Azure CLI command `az pipelines run --name MyPipeline --branch main --variables myVar=value1` triggers an existing pipeline named 'MyPipeline' on the 'main' branch, passing a plain-text variable 'myVar' with the value 'value1'. The `--variables` parameter sets pipeline variables at runtime, but they are not automatically marked as secret; to set a secret variable, you must use the `--secret-variables` parameter instead. This matches option C exactly.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Runs the pipeline on all branches with the variable.
Why it's wrong here
The command explicitly specifies `--branch main`, so the pipeline runs only on the `main` branch, not on all branches. The `--variables` parameter defines a run-time variable for this single execution, but branch scoping remains limited to the value supplied to `--branch`.
- ✗
Runs the pipeline and sets a secret variable.
Why it's wrong here
Variables passed via `--variables` in `az pipelines run` are plain text and are not marked as secret. To supply secret variables to a pipeline run, you would need to use the `--variables-secret` parameter or reference secret variables from the pipeline's library or variable groups.
- ✓
Runs the pipeline named 'MyPipeline' on the 'main' branch with a variable 'myVar' set to 'value1'.
Why this is correct
This option correctly describes `az pipelines run --name MyPipeline --branch main --variables myVar=value1`: it triggers an existing pipeline definition named `MyPipeline`, targets the `main` branch, and injects a non-secret variable `myVar` with the value `value1` for that run.
- ✗
Creates a new pipeline named 'MyPipeline' with a variable.
Why it's wrong here
The `az pipelines run` command is used to execute an existing pipeline, not to create a new one. Creating a pipeline would require a different command such as `az pipelines create`, which has its own parameters for defining the pipeline and its variables.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
Key term
Variables
A variable is a named storage location in a computer program that holds a value which can change during execution.
About these practice questions
This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.