0
0
Jenkinsdevops~10 mins

Initial admin setup wizard in Jenkins - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start Jenkins with the setup wizard enabled.

Jenkins
java -jar jenkins.war --[1]
Drag options to blanks, or click blank then click option'
Aenable-setup-wizard
BhttpPort=8080
Cdisable-setup-wizard
Dversion
Attempts:
3 left
💡 Hint
Common Mistakes
Using --disable-setup-wizard disables the wizard, which is not what we want.
Using httpPort=8080 sets the port but does not affect the wizard.
Using --version only shows the version and exits.
2fill in blank
medium

Complete the code to unlock Jenkins by providing the initial admin password file path.

Jenkins
cat [1]
Drag options to blanks, or click blank then click option'
A/var/log/jenkins/jenkins.log
B/var/lib/jenkins/secrets/initialAdminPassword
C/etc/jenkins/config.xml
D/usr/share/jenkins/jenkins.war
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to read the config.xml file instead of the password file.
Looking in the wrong directory for the password.
Reading the Jenkins log file instead of the password.
3fill in blank
hard

Fix the error in the command to disable the Jenkins setup wizard.

Jenkins
java -jar jenkins.war --[1]
Drag options to blanks, or click blank then click option'
Adisable-setup-wizard
Bdisable_setup_wizard
CdisableSetupWizard
Ddisable-setupwizard
Attempts:
3 left
💡 Hint
Common Mistakes
Using underscores instead of hyphens.
Using camelCase instead of hyphen-separated words.
Missing hyphen between 'setup' and 'wizard'.
4fill in blank
hard

Complete the code to create a dictionary comprehension that maps plugin names to their versions, filtering only plugins with version greater than 1.0.

Jenkins
{plugin: version for plugin, version in plugins.items() if version [1] '1.0'}
Drag options to blanks, or click blank then click option'
B>
C<
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Putting an operator in BLANK_1 which breaks the syntax.
Using < or == instead of > for filtering versions.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps plugin names in uppercase to their versions, filtering only plugins with version equal to '2.0'.

Jenkins
{ [1]: [2] for plugin, version in plugins.items() if version [3] '2.0' }
Drag options to blanks, or click blank then click option'
Aplugin.upper()
Bversion
C==
Dplugin
Attempts:
3 left
💡 Hint
Common Mistakes
Using the plugin name without uppercasing.
Using wrong comparison operators like < or >.
Swapping key and value positions.