Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to list all installed Jenkins plugins using the CLI.
Jenkins
java -jar jenkins-cli.jar -s http://localhost:8080 [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install-plugin' instead of 'list-plugins'.
Using 'restart' which restarts Jenkins, not listing plugins.
✗ Incorrect
The list-plugins command lists all installed plugins in Jenkins.
2fill in blank
mediumComplete the command to install the 'git' plugin using Jenkins CLI.
Jenkins
java -jar jenkins-cli.jar -s http://localhost:8080 [1] git
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'list-plugins' which only lists plugins.
Using 'uninstall-plugin' which removes plugins.
✗ Incorrect
The install-plugin command installs a plugin by name.
3fill in blank
hardFix the error in the command to update all plugins using Jenkins CLI.
Jenkins
java -jar jenkins-cli.jar -s http://localhost:8080 [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install-plugin --all' which is invalid.
Using 'upgrade-plugins' which is not a valid command.
✗ Incorrect
The correct command to update all plugins is update-plugins.
4fill in blank
hardFill both blanks to restart Jenkins safely after plugin installation.
Jenkins
java -jar jenkins-cli.jar -s http://localhost:8080 [1] && java -jar jenkins-cli.jar -s http://localhost:8080 [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'restart' instead of 'safe-restart' which may interrupt jobs.
Reversing the order of commands.
✗ Incorrect
First, install the plugin with install-plugin, then safely restart Jenkins with safe-restart.
5fill in blank
hardFill all three blanks to install multiple plugins and restart Jenkins safely.
Jenkins
java -jar jenkins-cli.jar -s http://localhost:8080 [1] git [2] docker [3] && java -jar jenkins-cli.jar -s http://localhost:8080 safe-restart
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'list-plugins' instead of 'install-plugin'.
Missing the deploy flag to apply plugins before restart.
✗ Incorrect
Use install-plugin twice for each plugin, with --deploy to apply changes immediately before safe restart.