Containers Jenkins Workspace

  • By Ubuntu Containers Team
Channel Version Revision Published Runs on
latest/stable 1 1 18 Mar 2021
Ubuntu 16.04 Ubuntu 14.04
juju deploy containers-jenkins-workspace
Show information
You will need Juju 2.9 to be able to run this command. Learn how to upgrade to Juju 2.9.


16.04 14.04


A subordinate charm for Jenkins allowing customization. Read more

Relevant links

Discuss this charm

Share your thoughts on this charm with the community on discourse.

Join the discussion


This is a subordinate charm used to configure the Jenkins builders for a deployed jenkins charm.

Jenkins is an automation engine with a plugin ecosystem that supports a variety of tools to create delivery pipelines, continuous integration, automated testing, or continuous delivery.

This subordinate customizes the workspace on any unit added to the horizontally scalable Jenkins server.


Deploy the jenkins charm and deploy the jenkins-workspace charm and relate the two charms in Juju:

juju deploy jenkins
juju deploy jenkins-workspace
juju add-relation jenkins jenkins-workspace

Then you need to add the "workspace" resource to the jenkins-workspace charm. The workspace resource is a compressed archive of at a minimum, a directory with the buildler name, and a config.xml with the builder definition.

Add the resource using the Juju resources feature:

juju attach jenkins-workspace workspace=kubernetes-builder.tgz

Supported Actions


snapshot - Create a compressed snapshot of the workspace directories. The resulting tgz file is compatible with this charm's resource.

Example snapshot operation:

# Create the snapshot of the current Jenkins Jobs.
juju run-action jenkins-workspace/0 snapshot outfile=/home/ubuntu/snapshot.tgz
# Copy the snapshot out of the charm to the local directory.
juju scp jenkins-workspace/0:/home/ubuntu/snapshot.tgz .

restore-snapshot - Takes a Juju resource (tgz file) and installs the workspaces uncompresses to the Jenkins jobs directory. Using the atomic flag allows the removal of existing workspaces before the resource is expanded.

# Upload a new resource to the jenkins-workspace charm.
juju attach jenkins-workspace workspace=./snapshot.tgz
# Delete current Jenkins jobs and install the current workspace resource.
juju run-action jenkins-workspace restore-snapshot atomic=True

Further information

This charm was built from a the jenkins-workspace layer

Check out the Jenkins documentation for more information about Jenkins and workspaces.

The Jenkins charm is available at the Juju Charm Store.