Debian

Buildkite Packages provides registry support for Debian-based (deb) packages for Debian and Ubuntu operating system variants.

Once your Debian registry has been created, you can publish/upload packages (generated from your application's build) to this registry via the curl command presented on your Debian registry's details page.

To view and copy this curl command:

  1. Select Packages in the global navigation to access the Registries page.
  2. Select your Debian registry on this page.
  3. Select Publish a Deb Package and in the resulting dialog, use the copy icon at the top-right of the code box to copy this curl command and submit it to publish a package to your Debian registry.

This command provides:

  • The specific URL to publish a package to your specific Debian registry in Buildkite.
  • The API write token (generated by Buildkite Packages) required to publish packages to your Debian registry.

Publish a package

The following curl command (modified as required before submitting) describes the process above to publish a package to your Debian registry:

curl -X POST https://buildkitepackages.com/api/v1/repos/{org.slug}/{registry.name}/packages.json \
  -H "Authorization: Bearer $REGISTRY_WRITE_TOKEN" \
  -F "package[package_file]=@<path_to_file>"

where:

  • {org.slug} can be obtained from the end of your Buildkite URL, after accessing Pipelines in the global navigation of your organization in Buildkite.
  • {registry.name} is the name of your Debian registry.
  • $REGISTRY_WRITE_TOKEN is the Buildkite Packages-generated API token required to publish/upload packages to your Debian registry.
  • <path_to_file> is the full path required to the package file. If the file is located in the same directory that this command is running from, then no path is required.

For example, to upload the file my-deb-package_1.0-2_amd64.deb from the current directory to the My-Debian-packages registry in the My organization Buildkite organization, run the curl command:

curl -X POST https://buildkitepackages.com/api/v1/repos/my-organization/my-debian-packages/packages.json \
  -H "Authorization: Bearer $REPLACE_WITH_MY_REGISTRY_WRITE_TOKEN" \
  -F "package[package_file]=@my-deb-package_1.0-2_amd64.deb"

Access a package's details

A Debian (deb) package's details can be accessed from this registry using the Packages section of your Debian registry page.

To access your deb package's details page:

  1. Select Packages in the global navigation to access the Registries page.
  2. Select your Debian registry on this page.
  3. On your Debian registry page, select the package within the Packages section. The package's details page is displayed.

The package's details page provides the following information in the following sections:

  • Installation (tab): the installation instructions.
  • Contents (tab, where available): a list of directories and files contained within the package.
  • Details (tab): a list of checksum values for this package—MD5, SHA1, SHA256, and SHA512.
  • About this version: a brief (metadata) description about the package.
  • Details: details about:

    • the name of the package (typically the file name excluding any version details and extension).
    • the package version.
    • the registry the package is located in.
    • the package's visibility (based on its registry's visibility)—whether the package is Private and requires authentication to access, or is publicly accessible.
    • the distribution name / version.
    • additional optional metadata contained within the package, such as a homepage, licenses, etc.

  • Last pushed: the date when the last package was uploaded to the registry.

  • Total files: the total number of files (and directories) within the package.

  • Dependencies: the number of dependency packages required by this package.

  • Package size: the storage size (in bytes) of this package.

  • Downloads: the number of times this package has been downloaded.

Downloading a package

A Debian (deb) package can be downloaded from the package's details page.

To download a package:

  1. Access the package's details.
  2. Select Download.

Installing a package

A Debian package can be installed using code snippet details provided on the package's details page.

To install a package:

  1. Access the package's details.
  2. Ensure the Installation > Installation instructions section is displayed.
  3. Copy the set of commands in the code snippet, paste them into your terminal, and submit them.

This code snippet is based on this format:

apt update
type -p curl >/dev/null || apt install curl -y
type -p gpg >/dev/null || apt install gpg -y
curl -fsSL "https://{registry.read.token}@buildkitepackages.com/{org.slug}/{registry.name}/gpgkey" | gpg --dearmor -o /etc/apt/keyrings/{org.slug}_{registry.name}-archive-keyring.gpg
curl -sfSL "https://{registry.read.token}@buildkitepackages.com/install/repositories/{org.slug}/{registry.name}/config_file.list?source=buildkite&name=${HOSTNAME}" > /etc/apt/sources.list.d/buildkite-{org.slug}-{registry.name}.list
apt update && apt install my-deb-package-name

where:

  • {registry.read.token} is the Buildkite Packages-generated API token required to download packages from your Debian registry. This URL component, along with the following @ are not required for registries that are publicly accessible.
  • {org.slug} can be obtained from the end of your Buildkite URL, after accessing Pipelines in the global navigation of your organization in Buildkite.
  • {registry.name} is the name of your Debian registry.