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
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
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:
*.dsc, *.bz2, *.gz, *.deb
|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!