Complete the code to start the Jenkins service.
sudo systemctl [1] jenkinsStarting Jenkins with start launches the service so it can run jobs.
Complete the code to check if Jenkins is running.
sudo systemctl [1] jenkinsThe status command shows if Jenkins is active or stopped.
Fix the error in the command to reload Jenkins configuration without restarting.
sudo systemctl [1] jenkinsThe reload command applies config changes without stopping Jenkins.
Fill both blanks to create a Jenkins job that runs a shell command and only triggers on changes.
pipeline {
agent any
triggers {
[1]('[2]')
}
stages {
stage('Build') {
steps {
sh 'echo Building...'
}
}
}
}The pollSCM trigger checks for source code changes every 5 minutes using the cron syntax H/5 * * * *.
Fill all three blanks to define environment variables and use them in a Jenkins pipeline.
pipeline {
agent any
environment {
[1] = '[2]'
}
stages {
stage('Print') {
steps {
echo "Value is: $[3]"
}
}
}
}Define MY_VAR with value hello_world and use MY_VAR in the echo step to print the value.
