These instructions are generic examples. Cloudsmith provides contextual setup details for Jenkins, with copy n' paste snippets (with your namespace/repo pre-configured) in the documentation within a repository.
If you haven't already done so you'll need to expose your Cloudsmith API Key within Jenkins. We recommend using the credentials plugin then injecting the
CLOUDSMITH_API_KEY environment variable into your build jobs.
In the following examples:
FORMAT: The format of the package
OWNER: The account name / org name (namespace)
REPOSITORY: Your repository name
PACKAGE_FILE: The filename of the package
Add the following as a build step to perform the push to Cloudsmith:
pip install cloudsmith-cli cloudsmith push FORMAT OWNER/REPOSITORY PACKAGE_FILE
Add the following as a build stage to perform the push to Cloudsmith:
stage "Deploy" sh('pip install cloudsmith-cli') sh('cloudsmith push FORMAT OWNER/REPOSITORY PACKAGE_FILE')
The push command will vary with the package format, an example of the push command for a debian package would look like:
cloudsmith push deb my-org/example-repo1/ubuntu/xenial foo-1.0.deb
Please see the Cloudsmith CLI for full details of the push command for other formats and additional help).
Updated 6 months ago