Certified Jenkins Engineer
Extending Jenkins and Administration
Demo Managing Plugins
In this hands-on guide, we’ll uninstall and clean up the Copy Artifact plugin in a simple chained-job workflow: ascii-build-job → ascii-test-job → ascii-deploy-job. By the end, you’ll know how to verify artifact handling, remove a plugin, and ensure no orphaned configuration remains.
Table of Contents
- Job Workflow
- Step 1: Verify Build Job Generates Artifact
- Step 2: Configure Test Job to Copy Artifacts
- Step 3: Trigger Builds and Observe Workflow
- Step 4: Confirm Plugin Installation
- Step 5: Locate Plugin on Filesystem
- Step 6: Uninstall Copy Artifact Plugin
- Step 7: Re-run Jobs After Uninstallation
- Step 8: Inspect Job Configuration
- Conclusion
Job Workflow
Job Name | Purpose |
---|---|
ascii-build-job | Fetches advice from API, archives advice.json |
ascii-test-job | Copies advice.json with Copy Artifact Plugin and validates word count |
ascii-deploy-job | (Optional) Deploys validated advice to target system |
Step 1: Verify Build Job Generates Artifact
On the ascii-build-job dashboard, confirm the build archives advice.json
successfully.
Step 2: Configure Test Job to Copy Artifacts
In ascii-test-job, add a Build Step → Copy artifacts from another project. Select:
- Project name:
ascii-build-job
- Which build: Latest successful build
- Artifacts to copy:
advice.json
Step 3: Trigger Builds and Observe Workflow
- Click Build Now on ascii-build-job.
- Review console output to ensure
advice.json
was archived:
$ ls advice.json
advice.json
$ cat advice.json
{"slip":{"advice":"Don't promise what you can't deliver."}}
$ jq -r .slip.advice
Don't promise what you can't deliver.
$ wc -w advice.json
6 advice.json
- Both ascii-build-job and ascii-test-job should pass:
Step 4: Confirm Plugin Installation
Navigate to Manage Jenkins → Manage Plugins → Installed. Verify Copy Artifact is listed:
$ cd $JENKINS_HOME/plugins
$ ls | grep -i copy
copyartifact.jpi
Step 5: Locate Plugin on Filesystem
From a terminal (or IDE), inspect the plugin file:
$ cd $JENKINS_HOME/plugins
$ ls | grep -i copyartifact
copyartifact.jpi
Step 6: Uninstall Copy Artifact Plugin
- Go to Manage Plugins → Installed.
- Click Uninstall next to Copy Artifact.
- Confirm the dialog to remove the plugin binary.
Note
Uninstalling removes copyartifact.jpi
from $JENKINS_HOME/plugins
, but job XMLs still reference the plugin until Jenkins is restarted.
Step 7: Re-run Jobs After Uninstallation
Trigger ascii-build-job again, then ascii-test-job. You’ll see the copy step succeed (artifact already on disk), but Jenkins still internally uses the missing plugin reference:
[ascii-test-job] $ /bin/sh -xe /tmp/jenkinsXXXX.sh
+ ls advice.json
advice.json
+ cat advice.json
{"slip":{"advice":"Don't try and bump start a motorcycle on an icy road."}}
+ jq -r .slip.advice
Don't try and bump start a motorcycle on an icy road.
+ wc -w advice.json
11 advice.json
Step 8: Inspect Job Configuration
Open ascii-test-job/config.xml
and locate the plugin reference:
<project>
<builders>
<hudson.plugins.copyartifact.CopyArtifact plugin="[email protected]_dca_a_9b_6549">
<project>ascii-build-job</project>
<filter>advice.json</filter>
<selector class="hudson.plugins.copyartifact.StatusSelector">
<stable>true</stable>
</selector>
</hudson.plugins.copyartifact.CopyArtifact>
<!-- ... other builders ... -->
</builders>
</project>
Without the plugin binary, this builder will error after a Jenkins restart. A full restart is required to purge these orphaned entries.
Warning
After uninstalling a plugin, always restart Jenkins to remove its XML elements from job configurations.
Conclusion
To fully remove a plugin and its configuration:
- Uninstall the plugin via Manage Plugins.
- Restart Jenkins to clean up any residual
<plugin>
elements in jobconfig.xml
files.
For more information, see the Jenkins Plugin Management documentation.
Watch Video
Watch video content