jenkins #11

Supports: xenial bionic focal


Jenkins is an extendable open source continuous integration server that monitors executions of repeated jobs. The focus of Jenkins is the building/testing of software project continuously, and monitoring executions of externally-run jobs. More information at This charm provides the Jenkins master service, and when paired with the jenkins-slave charm provides an easy way to deploy Jenkins on Ubuntu server, and scale out Jenkins slaves.


Build Status Coverage Status

This charm (along with its companion, jenkins-slave) provides an easy way to deploy Jenkins on Ubuntu server and scale out Jenkins slaves.

This charm provides a Jenkins Server which can be accessed, after exposing, on http://<master>:8080.


If you want to run jobs on separate nodes you will also need to deploy the jenkins-slave charm:

juju deploy jenkins
juju deploy -n 5 jenkins-slave
juju add-relation jenkins jenkins-slave

Slaves will attempt to connect via JNLP on port 48484 by default. This is configurable, e.g.:

juju config jenkins jnlp-port=12345

If you want the previously-default behaviour of a random TCP port, you can set this to -1:

juju config jenkins jnlp-port=-1

Or if you want to disable the feature entirely, set it to 0:

juju config jenkins jnlp-port=0

The default password for the 'admin' account will be auto-generated.

You can set it using:

juju config jenkins password=mypassword

Always change it this way - this account is used by the charm to manage slave configuration.

Then feel free to expose your Jenkins master:

juju expose jenkins

The Jenkins UI will be accessible on http://<master>:8080.

Scale out Usage

The main method to use the Jenkins service at scale is to add units to the jenkins-slave, as illustrated in the example usage:

juju deploy -n 5 jenkins-slave

Here the "-n 5" is adding 5 additional units (instances) to the jenkins-slave. Of course that "5" can be as large as you wish or your cloud provider supports. Additional information on scaling services with add-unit can be found at Juju Scaling Docs.

Storage Support

This charm includes Juju storage support which can be used in the standard way, for example:

juju deploy jenkins --storage jenkins=10G

Adding storage to an existing application is not supported.


You have already seen the password configuration in the "Usage" section. Some other interesting config options are plugins and release. You can add config options via the command line with juju set or via a config file. More information on Juju config is at Juju Config Docs.

Plugin config example

juju config jenkins plugins=htmlpublisher view-job-filters bazaar git

Release config example

juju config jenkins release=trunk

You could also set these config options via a config.yaml on jenkins deploy. For example your config.yaml could look like:

  plugins: htmlpublisher view-job-filters bazaar git 
  release: trunk

You would then deploy jenkins with your config such as:

juju deploy --config config.yaml jenkins

Extending this charm

If you wish to perform custom configuration of either the master or slave services, you can branch this charm and add install hooks into hooks/install.d.

These will be executed when the main install, config-changed or upgrade-charm hooks are executed (as the config-changed and upgrade-charm hooks just call install).

Additional hooks are executed in the context of the install hook so you may use any variables which are defined in this hook.

Jenkins Project Information


(string) Site to download deb packages from when installing jenkins from bundle. If this configuration is not set, the jenkins deb package needs to be manually copied over to the charm files/ dir before deployment and named jenkins.deb.
(string) Space separated list of extra deb packages to install.
(string) List of signing keys for install_sources package sources, per charmhelpers standard format (a yaml list of strings encoded as a string). The keys should be the full ASCII armoured GPG public keys. While GPG key ids are also supported and looked up on a keyserver, operators should be aware that this mechanism is insecure. null can be used if a standard package signing key is used that will already be installed on the machine, and for PPA sources where the package signing key is securely retrieved from Launchpad.
(string) List of extra apt sources, per charm-helpers standard format (a yaml list of strings encoded as a string). Each source may be either a line that can be added directly to sources.list(5), or in the form ppa:<user>/<ppa-name> for adding Personal Package Archives, or a distribution component to enable.
(int) TCP port on which to listen for incoming connections from slaves. Set to -1 for a random port, or to 0 to disable JNLP entirely.
(int) Number of executors to configure for jenkins master.
(string) The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".
(string) Admin user password - used to manage slave nodes so please don't change in Jenkins.
(string) Space separated list of plugins to install
(boolean) This option enables auto update for plugins. The routine will check for new versions available based on Update Center's info, will update them through jenkins and safe-restart once completed.
(int) Interval which the auto-update will try to run (in minutes).
(string) Set to no to allow downloading from an invalid https site.
(string) Site to download plugin .hpi files from.
(string) Public url of Jenkins frontend, including the hostname and prefix. This is used by Jenkins whenever generating full links.
(string) Source of Jenkins, options include: - lts: use the most recent Jenkins LTS release. - trunk: use the most recent Jenkins release. - bundle: use a bundled deb package. The bundle-site configuration should be set or the jenkins deb package needs to be manually copied over to the charm files/ dir before deployment and named jenkins.deb. It can be downloaded from - http(s)://...: http(s) link to a retrievable jenkins deb
(string) Set this to yes to remove any plugins not listed in plugins from the installation.
(string) Tooling to deploy alongside jenkins
git gcc make bzr
(string) Configure a custom Update Center instead of getting plugins from Provide the whole path to update-center.json file. Example:
(string) CA certificate for the update-center. This is required when setting update-center because jenkins won't be able to validate your custom Update Center without it.
(string) Admin user username - used to manage slave nodes so please don't change in Jenkins.