0
0
Jenkinsdevops~5 mins

Branch selection and branch specifier in Jenkins - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a branch specifier in Jenkins?
A branch specifier tells Jenkins which branch to build from your source code repository. It helps Jenkins pick the right code version.
Click to reveal answer
beginner
How do you specify the main branch in Jenkins using a branch specifier?
You use */main or */master in the branch specifier field to tell Jenkins to build the main branch.
Click to reveal answer
intermediate
What does the asterisk (*) mean in a Jenkins branch specifier like */feature/*?
The asterisk (*) is a wildcard that matches any characters. So */feature/* matches any branch inside the feature folder or prefix.
Click to reveal answer
beginner
Why is branch selection important in Jenkins pipelines?
Branch selection ensures Jenkins builds and tests the correct version of your code. It helps avoid mistakes like building old or wrong branches.
Click to reveal answer
intermediate
How can you select multiple branches in Jenkins using branch specifiers?
You can enter multiple branch specifiers each on a separate line, like */main */develop, to build both branches.
Click to reveal answer
What does the branch specifier */develop mean in Jenkins?
ABuild the develop branch
BBuild all branches
CBuild the main branch
DBuild no branches
Which symbol is used as a wildcard in Jenkins branch specifiers?
A#
B$
C*
D?
How do you specify multiple branches in Jenkins branch specifier?
AEnter each on a new line
BSeparate with semicolons
CUse a single wildcard
DUse spaces
Why should you carefully select branches in Jenkins builds?
ATo save disk space
BTo build the correct code version
CTo speed up the internet
DTo avoid using Jenkins
What does */feature/* match in Jenkins branch specifier?
AOnly main branch
BOnly the feature branch
CNo branches
DAny branch starting with feature/
Explain how branch specifiers work in Jenkins and why they are useful.
Think about how Jenkins knows which code to build.
You got /3 concepts.
    Describe how to select multiple branches for building in Jenkins using branch specifiers.
    Consider how to tell Jenkins to build more than one branch.
    You got /3 concepts.