A pipeline trigger is a way to start a Jenkins pipeline automatically when a specific event happens, like a code commit or another pipeline finishing.
Click to reveal answer
beginner
Explain upstream and downstream pipelines in Jenkins.
An upstream pipeline is the one that runs first and can trigger another pipeline called the downstream pipeline. The downstream pipeline depends on the upstream pipeline's completion.
Click to reveal answer
intermediate
How can you trigger a downstream pipeline from an upstream pipeline in Jenkins?
You can use the 'build' step in the upstream pipeline script to start the downstream pipeline after the upstream finishes.
Click to reveal answer
beginner
What is the benefit of using pipeline triggers between upstream and downstream jobs?
It automates the workflow, ensuring that dependent tasks run in order without manual intervention, saving time and reducing errors.
Click to reveal answer
beginner
Name one way to trigger a Jenkins pipeline on a code commit.
You can use a webhook from your source code repository (like GitHub) to trigger the Jenkins pipeline when code is pushed.
Click to reveal answer
Which Jenkins pipeline is called the 'downstream' pipeline?
AThe pipeline triggered by another pipeline
BThe pipeline that triggers another pipeline
CThe pipeline that runs independently
DThe pipeline that runs before any other pipeline
✗ Incorrect
The downstream pipeline is the one triggered by another pipeline, called the upstream pipeline.
What Jenkins step is commonly used to trigger another pipeline?
Acheckout
Bsh
Cbuild
Dstage
✗ Incorrect
The 'build' step is used to trigger another pipeline or job in Jenkins.
How can a Jenkins pipeline be triggered automatically on a code push?
AUsing a webhook from the code repository
BBy running a shell script
CBy scheduling a timer
DBy manually clicking 'Build Now'
✗ Incorrect
A webhook from the code repository can notify Jenkins to start the pipeline automatically on code push.
What is the main advantage of linking upstream and downstream pipelines?
ATo avoid using Jenkinsfiles
BTo reduce pipeline execution time
CTo run pipelines in parallel
DTo automate sequential workflows
✗ Incorrect
Linking pipelines automates workflows so tasks run in the correct order without manual steps.
Which of these is NOT a trigger type for Jenkins pipelines?
AWebhook trigger
BDatabase trigger
CManual trigger
DUpstream pipeline trigger
✗ Incorrect
Jenkins does not support database triggers natively for pipelines.
Describe how you would set up a Jenkins pipeline to trigger another pipeline after it finishes.
Think about the Jenkins pipeline script and how one job can start another.
You got /4 concepts.
Explain the difference between upstream and downstream pipelines and why this relationship is useful.
Consider which pipeline runs first and which depends on the other.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of using pipeline triggers in Jenkins?
easy
A. To delete old job logs automatically
B. To manually run jobs one by one
C. To stop all jobs from running
D. To automatically start a job when another job finishes
Solution
Step 1: Understand pipeline triggers
Pipeline triggers are used to start one job automatically after another job finishes.
Step 2: Identify the purpose
This automation helps connect jobs without manual intervention.
Final Answer:
To automatically start a job when another job finishes -> Option D
Quick Check:
Pipeline triggers = automatic job start [OK]
Hint: Triggers start jobs automatically after others finish [OK]
Common Mistakes:
Thinking triggers run jobs manually
Confusing triggers with log cleanup
Believing triggers stop jobs
2. Which syntax correctly triggers a downstream job named Build-App after the current pipeline completes successfully?
easy
A. build job: 'Build-App', propagate: true, wait: true
B. trigger job: 'Build-App' onSuccess
C. start job 'Build-App' after success
D. run job 'Build-App' always
Solution
Step 1: Recall Jenkins pipeline syntax for triggering jobs
The correct syntax uses the build step with parameters like job, propagate, and wait.
5. You want to create a Jenkins pipeline where Job A triggers Job B only if Job A succeeds, and Job B triggers Job C regardless of its result. Which configuration correctly achieves this?
hard
A. In Job A pipeline: build job: 'Job-B', propagate: true, wait: true In Job B pipeline: build job: 'Job-C', propagate: false, wait: false
B. In Job A pipeline: build job: 'Job-B', propagate: false, wait: false In Job B pipeline: build job: 'Job-C', propagate: true, wait: true
C. In Job A pipeline: build job: 'Job-B', propagate: true, wait: false In Job B pipeline: build job: 'Job-C', propagate: true, wait: true
D. In Job A pipeline: build job: 'Job-B', propagate: false, wait: true In Job B pipeline: build job: 'Job-C', propagate: false, wait: true
Solution
Step 1: Ensure Job B triggers only on Job A success
Using propagate: true in Job A means failure in Job B will fail Job A, so Job B runs only if Job A succeeds.
Step 2: Ensure Job C triggers regardless of Job B result
Using propagate: false and wait: false in Job B triggers Job C without waiting and ignores Job C's result.
Final Answer:
Option A matches these requirements -> Option A
Quick Check:
propagate true for success-only triggers, false for unconditional [OK]
Hint: Use propagate true for success-only, false for unconditional triggers [OK]
Common Mistakes:
Using propagate false when success-only is needed
Confusing wait true/false effects
Triggering downstream jobs incorrectly
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.