This blog post details all ways you can push packages to packagecloud using different languages and platforms.
Pushing a Package: Fundamentals
For this example, we’ll use our packagecloud-test package. We’ll be pushing this package to
julio/example_repo for the
If you’d like to follow along, make sure you have your API token handy.
The steps for pushing a package are as follows:
Skip this step for rubygems Use the distributions API to get the desired
distro_version_idfor your upload. (This is also a great endpoint for testing that your API token and http client are setup correctly)
POSTrequest with the
distro_version_idto the package create API to push your package.
Click the Add Package button.
Fetch the list of distributions.
We can see that it’s
142 (helps if you pretty print the JSON).
Using package_cloud gem
(It will ask for your API token on first use)
Using packagecloud-ruby gem
Using io.packagecloud.client java library
Using pkgcloud go library
Using Jenkins Packagecloud Plugin
See the plugin documentation for usage and install instructions.
Using Travis CI
See the plugin documentation for usage instructions.
Using anything that can speak HTTP
To construct a package create API request, you need the following:
POSTrequest of the
- The body of which needs to be a valid MIME Multipart message with two parts:
text/plainpart containing the
application/octet-streampart containing the binary data of that package
We are always adding new integrations and ways to push to packagecloud, check back often to see if your favorite language or platform has been added!
Check out our slack or email firstname.lastname@example.org if you have any suggestions for new languages or platforms to support.