Challenge - 5 Problems
Jenkins System Configuration Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Jenkins CLI: List all installed plugins
What is the output of the following Jenkins CLI command when run on a Jenkins server with plugins installed?
Jenkins
java -jar jenkins-cli.jar -s http://localhost:8080/ list-pluginsAttempts:
2 left
💡 Hint
Think about what the 'list-plugins' command is designed to show in Jenkins CLI.
✗ Incorrect
The 'list-plugins' command in Jenkins CLI lists all installed plugins along with their versions and whether they are enabled or disabled.
❓ Configuration
intermediate2:00remaining
Jenkins Pipeline: Correct syntax for environment variables
Which Jenkins Pipeline snippet correctly sets environment variables for use in the pipeline?
Jenkins
pipeline {
agent any
environment {
VAR1 = 'value1'
VAR2 = 'value2'
}
stages {
stage('Example') {
steps {
echo "VAR1 is ${VAR1} and VAR2 is ${VAR2}"
}
}
}
}Attempts:
2 left
💡 Hint
Look at the correct syntax for environment variables in Jenkins declarative pipeline.
✗ Incorrect
In Jenkins declarative pipeline, environment variables are set using VAR = 'value' syntax inside the environment block.
🔀 Workflow
advanced2:30remaining
Jenkins Job DSL: Creating a freestyle job with parameters
Which Job DSL script correctly creates a freestyle Jenkins job named 'BuildApp' with a string parameter 'BRANCH' defaulting to 'main'?
Attempts:
2 left
💡 Hint
Check the exact method name for string parameters in Jenkins Job DSL.
✗ Incorrect
The correct method to define a string parameter in Job DSL is stringParam(name, defaultValue, description).
❓ Troubleshoot
advanced2:30remaining
Jenkins Pipeline: Diagnosing a syntax error in a scripted pipeline
Given this Jenkins scripted pipeline snippet, what error will Jenkins report?
Jenkins
node {
stage('Build') {
echo 'Building...'
}
stage('Test')
echo 'Testing...'
}
}Attempts:
2 left
💡 Hint
Look carefully at the braces and structure after the 'stage('Test')' line.
✗ Incorrect
The 'stage' block must have braces enclosing its steps. Missing '{' causes a syntax error.
✅ Best Practice
expert3:00remaining
Jenkins Configuration as Code (JCasC): Correct YAML snippet for global security
Which YAML snippet correctly disables Jenkins security using Configuration as Code (JCasC)?
Attempts:
2 left
💡 Hint
Disabling security means no authentication required and full access for anyone including anonymous users.
✗ Incorrect
Setting securityRealm to 'none' disables authentication. The 'anyoneCanDoAnything' authorizationStrategy allows full access without restrictions.