Jenkins : Packagecloud Plugin

Plugin Information

View packagecloud on the plugin site for more information.

This plugin adds a post-build step that allows you to upload any fingerprinted artifacts to packagecloud.io.

Be sure to check the packagecloud Jenkins plugin documentation as well.

Plugin Installation (Jenkins 1.5 or higher required):


Go to 'Manage Jenkins'

Click 'Manage Plugins'

Find the 'packagecloud' plugin under the 'Available' section

Credentials Setup:


From the main page go to 'Credentials'

Click 'Add domain' to create a new domain

Name it whatever you wish, but make sure you add the 'Hostname' specification

Use 'packagecloud.io' (or your custom packagecloud:enterprise domain name) as the 'Include' domain

Add a 'Username with password' entry using your packagecloud.io (or packagecloud:enterprise) username as the username and your API token as the password.

You can get your token via the API Token settings page here: Packagecloud API Token

Uploading artifacts from a job:

Ensure that your build job is set to record fingerprints matching the artifacts you wish to upload


For example, given a job that builds an rpm, you'd use this as your fingerprint regular expression

Refer to this table for what regular expression to use for a particular package type:

Package Type

Fingerprint Expression

rpm

*.rpm

dsc

*.dsc, *.bz2, *.gz, *.deb

deb

*.deb

gem

*.gem

node*.tgz
python*.gz, *.bz2, *.z, *.tar, *.egg-info, *.zip, *.whl, *.egg

Read more about artifact fingerprinting here: Jenkins Fingerprint

Add the post-build step to your build


Set the username, repository and distribution for the artifact:

If using packagecloud:enterprise, enter the hostname (same one used for the credentials step above), port and protocol:

Then build your job as usual, and your artifact will be pushed up to packagecloud!