📖 Scenario: You are setting up a Jenkins server to automate your software builds. Jenkins uses plugins to add extra features like notifications, source control integration, and build tools.To manage plugins, you need to understand how to list installed plugins, add new plugins, and check plugin statuses.
🎯 Goal: Learn how to work with Jenkins plugins by listing installed plugins, adding a new plugin, and verifying the plugin installation status using Jenkins CLI commands.
📋 What You'll Learn
Use Jenkins CLI commands to list installed plugins
Add a plugin using Jenkins CLI
Check the status of a specific plugin
Print the final list of plugins including the newly added one
💡 Why This Matters
🌍 Real World
Jenkins plugins extend Jenkins capabilities to support many tools and workflows in software development.
💼 Career
Knowing how to manage Jenkins plugins is essential for DevOps engineers to customize and maintain CI/CD pipelines.
Progress0 / 4 steps
1
List Installed Jenkins Plugins
Write the Jenkins CLI command to list all installed plugins using java -jar jenkins-cli.jar -s http://localhost:8080 list-plugins and save the output to a file called plugins.txt.
Jenkins
Hint
Use the Jenkins CLI list-plugins command and redirect output to plugins.txt.
2
Add a New Plugin
Write the Jenkins CLI command to install the git plugin using java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin git.
Jenkins
Hint
Use the install-plugin command with the plugin name git.
3
Check Plugin Installation Status
Write the Jenkins CLI command to check the status of the git plugin using java -jar jenkins-cli.jar -s http://localhost:8080 list-plugins | grep git.
Jenkins
Hint
Use list-plugins and filter output with grep git to see the plugin status.
4
Display Final Plugins List
Write the commands to first update plugins.txt with the current list of plugins and then display its contents.
Jenkins
Hint
Update the file first: java -jar jenkins-cli.jar -s http://localhost:8080 list-plugins > plugins.txt, then cat plugins.txt.
Practice
(1/5)
1. What is the main purpose of Jenkins plugins?
easy
A. To replace Jenkins core with a new system
B. To add extra features and extend Jenkins functionality
C. To uninstall Jenkins from the server
D. To create new Jenkins user accounts automatically
Solution
Step 1: Understand Jenkins core functionality
Jenkins core provides basic automation but limited features.
Step 2: Role of plugins in Jenkins
Plugins add extra features and extend Jenkins to support more tasks.
Final Answer:
To add extra features and extend Jenkins functionality -> Option B
Quick Check:
Plugins extend Jenkins [OK]
Hint: Plugins add features to Jenkins, not replace or remove it [OK]
Common Mistakes:
Thinking plugins replace Jenkins core
Confusing plugins with user management
Believing plugins uninstall Jenkins
2. Which of the following is the correct way to install a plugin in Jenkins?
easy
A. Use the Jenkins web interface Plugin Manager
B. Run 'jenkins install-plugin' command in terminal
C. Edit Jenkins config.xml to add plugin name
D. Upload plugin files to /var/lib/jenkins/plugins manually
Solution
Step 1: Identify official plugin installation method
Jenkins provides a Plugin Manager in its web interface for safe plugin installation.
Step 2: Evaluate other options
Command line and manual file upload are not standard or safe methods; editing config.xml is incorrect.
Final Answer:
Use the Jenkins web interface Plugin Manager -> Option A
Quick Check:
Plugin Manager in web UI [OK]
Hint: Install plugins via Jenkins web Plugin Manager, not manually [OK]
Common Mistakes:
Trying to install plugins via terminal commands
Editing config files directly for plugins
Uploading plugin files without Plugin Manager
3. After installing a new plugin in Jenkins, what is usually required to activate it?
medium
A. Delete the plugin files
B. Clear browser cache
C. Run a Jenkins build job
D. Restart Jenkins service
Solution
Step 1: Understand plugin activation process
Most Jenkins plugins require Jenkins to restart to load new plugin code properly.
Step 2: Check other options
Deleting files disables plugins, running builds or clearing cache does not activate plugins.
Final Answer:
Restart Jenkins service -> Option D
Quick Check:
Plugin activation needs restart [OK]
Hint: Restart Jenkins after plugin install to activate it [OK]
Common Mistakes:
Thinking builds activate plugins
Deleting plugin files to activate
Clearing browser cache helps plugin activation
4. You installed a plugin but Jenkins shows errors and the plugin features don't appear. What is the most likely cause?
medium
A. Plugin is incompatible with current Jenkins version
B. You forgot to create a Jenkins user
C. Jenkins server disk is full
D. Browser is not supported
Solution
Step 1: Analyze plugin error causes
Plugin errors often happen if plugin version does not match Jenkins core version.
Step 2: Evaluate other options
User creation, disk space, or browser issues usually don't cause plugin feature errors.
Final Answer:
Plugin is incompatible with current Jenkins version -> Option A
Quick Check:
Plugin errors = incompatibility [OK]
Hint: Check plugin compatibility with Jenkins version first [OK]
Common Mistakes:
Blaming user accounts for plugin errors
Ignoring plugin-Jenkins version mismatch
Assuming browser issues cause plugin errors
5. You want to customize Jenkins to send notifications to a new chat app. Which Jenkins plugin system feature helps you achieve this?
hard
A. Create a new Jenkins user with chat permissions
B. Modify Jenkins core source code to add chat support
C. Install a notification plugin for the chat app via Plugin Manager
D. Use Jenkins built-in email notification only
Solution
Step 1: Identify how Jenkins supports new tools
Jenkins uses plugins to add support for external tools like chat apps.
Step 2: Choose the correct method
Installing a notification plugin via Plugin Manager is the standard way to add chat notifications.
Final Answer:
Install a notification plugin for the chat app via Plugin Manager -> Option C
Quick Check:
Use plugins to add chat notifications [OK]
Hint: Add chat support by installing its plugin, not changing Jenkins core [OK]
Common Mistakes:
Trying to change Jenkins core code
Confusing user permissions with plugin features
Using only email notifications for chat apps
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.