0
0
Jenkinsdevops~5 mins

Git plugin configuration in Jenkins - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the Git plugin in Jenkins?
The Git plugin allows Jenkins to connect to Git repositories to clone, fetch, and manage source code for builds.
Click to reveal answer
beginner
Which Jenkins field specifies the Git repository URL in the Git plugin configuration?
The 'Repository URL' field is where you enter the Git repository's HTTPS or SSH URL.
Click to reveal answer
intermediate
How do you provide credentials for private Git repositories in Jenkins Git plugin?
You add credentials in Jenkins and select them in the Git plugin under 'Credentials' to allow Jenkins to access private repos.
Click to reveal answer
beginner
What does the 'Branches to build' field control in the Git plugin?
It specifies which branch or branches Jenkins should check out and build, e.g., 'main' or 'feature/*'.
Click to reveal answer
intermediate
How can you configure Jenkins Git plugin to clean the workspace before building?
Enable the 'Clean before checkout' option to remove old files and ensure a fresh copy of the repository.
Click to reveal answer
In Jenkins Git plugin, where do you enter the URL of the Git repository?
ARepository URL field
BBuild Triggers section
CPost-build Actions
DPipeline Script
How does Jenkins authenticate to a private Git repository using the Git plugin?
ABy entering username and password in the build script
BBy configuring Jenkins system environment variables
CBy using anonymous access
DBy selecting stored credentials in the plugin configuration
What is the effect of setting 'Branches to build' to 'main' in the Git plugin?
AJenkins builds all branches
BJenkins builds only the main branch
CJenkins ignores the main branch
DJenkins builds only tags
Which option ensures Jenkins cleans the workspace before checking out the Git repository?
ADisable submodules
BShallow clone
CClean before checkout
DSparse checkout
What type of URL can be used in the Git plugin's Repository URL field?
AHTTPS or SSH Git URLs
BOnly HTTP URLs
COnly local file paths
DFTP URLs
Describe how to configure Jenkins Git plugin to build a private repository branch.
Think about URL, credentials, and branch settings.
You got /3 concepts.
    Explain the purpose of the 'Clean before checkout' option in Jenkins Git plugin.
    Consider workspace cleanliness before build.
    You got /3 concepts.