Announcing official support for Buildkite

Announcing official support for Buildkite

Buildkite CI logos

TL;DR

packagecloud is excited to officially announce support for Buildkite.

Take a look at the updated docs with example configurations and information on how to push deb, rpm, and gem packages directly to packagecloud from your build process.

The Continuous Integration tab on repository pages has also been updated to include Buildkite integration information.

Buildkite

To push packages to packagecloud from Buildkite you must:

  1. Ensure the package_cloud gem is installed in your agent environment
  2. Expose the PACKAGECLOUD_TOKEN environment variable in your Buildkite environment hook
  3. Add a build script to push your build artifact to packagecloud

You’ll need your API token, which you can get from the API token section of account settings.

Example environment hook using an example API token:

#!/bin/bash

export PACKAGECLOUD_TOKEN='EXAMPLE-API-TOKEN'

Example build script that pushes a previously built build artifact to packagecloud:

#!/bin/bash

set -e

if [[ $# -eq 0 ]]; then
  echo "Usage: $0 username/myrepo path/to/package/artifact"
  exit 1
fi

# Download package artifact from a previous build step
buildkite-agent artifact download "$1" .

# Push package to packagecloud
package_cloud push "$2" "$(basename $1)"

Example build pipeline:

Buildkite build pipeline

Questions? We’re here to help! Email support@packagecloud.io

You might also like other posts...