1. Verify Jenkins Is Running
First, confirm that the Jenkins service is active: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 thedevsecops-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 andjq 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:4. Verify Plugin Installation
- Open Manage Jenkins → Manage Plugins → Installed in the Jenkins UI.
- If any plugin is missing, switch to Available, search for it (e.g., “Kubernetes CLI”), select the version, and click Install without restart.