You configured a Jenkins job with Git SCM plugin to clone a repository. The repository URL is correct, but the branch name is set to feature-xyz which does not exist in the remote repo.
What will Jenkins show in the console output when it tries to fetch this branch?
Think about what happens if Jenkins tries to fetch a branch that does not exist.
Jenkins will fail to fetch a branch that does not exist and show an error message indicating the missing remote branch.
Which Jenkins Pipeline syntax snippet correctly checks out a Git repository from https://github.com/example/repo.git on branch develop?
Remember the Jenkins Pipeline checkout step syntax for GitSCM.
Option A uses the correct checkout step with GitSCM class and proper branch and URL configuration.
A Jenkins job configured with Git SCM fails with the error: Authentication failed for https://github.com/example/repo.git. The credentials are set as username/password in Jenkins credentials store.
Which is the most likely cause?
Check if the credentials are properly selected in the job configuration.
If credentials are not linked in the SCM configuration, Jenkins cannot authenticate even if credentials exist in the store.
In a Jenkins Multibranch Pipeline job, what happens when a new branch is pushed to the remote Git repository?
Think about how Multibranch Pipeline jobs manage branches automatically.
Multibranch Pipeline jobs scan the repository and automatically create jobs for new branches.
What is the best practice for setting SCM polling frequency in Jenkins to balance build responsiveness and server load?
Consider the trade-off between build speed and resource usage.
Polling every 5 minutes is a common balance to detect changes promptly without excessive load.