Need to practice your Jenkins skills for an upcoming job interview? Try solving these Jenkins interview questions that test knowledge of Jenkins concepts such as creating pipelines, scheduling build tasks, and deploying builds. We’ll provide feedback on your answers, and you can use a hint if you get stuck.
These Jenkins questions are examples of real tasks used by employers to screen job candidates such as software developers, DevOps engineers, and others that require knowledge of automated software development pipelines.
1. Staging the Pipeline
The company's Jenkins pipeline needs to build multiple branches of code. Consider the Jenkins pipeline configuration below.
pipeline {
agent any
stages {
stage('Start Logging') {
steps { echo 'Starting to log...' }
}
stage('Branches') {
parallel {
stage('Development Branch') {
steps { echo 'Building Development Branch' }
}
stage('Production Branch') {
steps { echo 'Building Production Branch' }
}
stage('Features Branch') {
stages {
stage('Shopping Cart Feature') {
steps { echo 'Building Shopping Cart' }
}
stage('Customer Support Bot Feature') {
steps { echo 'Building Customer Support Bot' }
}
}
}
}
}
}
}
Which of these statements are true?
(Select all acceptable answers.)
2. Scheduling a Trigger
In order to schedule pipeline builds at a convenient time, the company studied when its employees actively committed changes. They discovered the best time to perform builds to reduce the likelihood of conflicts and interruptions was at 1:15 am. It was also discovered that the build must finish within 90 minutes.
Complete the Jenkins pipeline configuration below to ensure that all builds are started and ended daily at the appropriate time.
pipeline {
agent any
options {
(time , unit: '')
}
triggers {
('15 1 * * *')
}
stages {
stage('Company-Wide Build') {
steps {
echo 'Long-running task'
// ...
}
}
}
}

Jenkins Test (Easy)

Jenkins and DevOps Test (Easy)