Complete the code to specify the Jenkins Long-Term Support (LTS) version in a Dockerfile.
FROM jenkins/jenkins:[1]The lts tag in the Jenkins Docker image refers to the Long-Term Support version, which is more stable and recommended for production.
Complete the command to check the installed Jenkins version using the CLI.
java -jar jenkins-cli.jar -s http://localhost:8080 [1]
The version command shows the current Jenkins version installed on the server.
Fix the error in the Jenkins update command to use the LTS version.
wget https://get.jenkins.io/jenkins-[1].war -O jenkins.warTo download the Long-Term Support version of Jenkins, use lts in the URL.
Fill both blanks to create a Jenkins pipeline that triggers only on LTS version updates.
pipeline {
agent any
triggers {
pollSCM('[1]')
}
stages {
stage('Build') {
steps {
echo 'Building Jenkins version [2]'
}
}
}
}The cron expression H/15 * * * * polls every 15 minutes, and lts specifies the Long-Term Support version.
Fill all three blanks to define a Jenkins job that checks out code, builds, and echoes the Jenkins LTS version.
pipeline {
agent any
stages {
stage('Checkout') {
steps {
git url: '[1]'
}
}
stage('Build') {
steps {
sh 'make build'
}
}
stage('Version') {
steps {
echo 'Jenkins version: [2]'
echo 'Using [3] version'
}
}
}
}The Git URL points to the Jenkins source code repository. The version is labeled 'lts' for Long-Term Support, which is echoed as a friendly name.