Skip to main content
In this guide, you’ll learn how to install multiple Jenkins plugins automatically by leveraging the Jenkins Remote API. This approach avoids manual UI steps under Manage Jenkins → Manage Plugins, speeding up your CI/CD setup.

1. Verify Jenkins Is Running

First, confirm that the Jenkins service is active:
Example output:
Next, retrieve the initial admin password for API authentication:
Save this initial password—you’ll use it to generate an API token in the installer script.

2. Explore the Plugin Installer Script

Assuming you cloned the devsecops-k8s-demo repository, navigate to the Jenkins plugins directory:

2.1 plugins.txt

Here’s how the file lists desired plugins:

2.2 plugin-installer.sh

This Bash script automates plugin installation using the Jenkins Remote API and jq for JSON parsing:
Ensure jq is installed (sudo apt-get install -y jq) and Jenkins is accessible at localhost:8080 before running the script.

3. Run the Installer

Execute the installer script:
Sample output:

4. Verify Plugin Installation

  1. Open Manage Jenkins → Manage Plugins → Installed in the Jenkins UI.
  2. If any plugin is missing, switch to Available, search for it (e.g., “Kubernetes CLI”), select the version, and click Install without restart.

5. Next Steps

With your plugins in place, create a Jenkins pipeline that integrates Maven, Docker, and Kubernetes to validate the new capabilities.

Watch Video