Skip to content

Ubuntu Pro rocks

Anna Sancho Vaquer edited this page Oct 21, 2026 · 2 revisions

Rocks can be built with Ubuntu Pro services enabled, for example esm-apps, to include packages with extended security maintenance.

Prerequisites

  1. An Ubuntu Pro token with access to the services you want.

  2. Two repository secrets:

    • one holding the Pro token,
    • one holding a passphrase of your choosing. It encrypts the Pro-enabled build artifacts while they move between workflow jobs, so that Pro content is not exposed in the run's artifacts.
  3. A private or internal repository, if you want to upload the rock to GHCR.

Configuration

Add a pro section to the image in .github/ci.yaml:

images:
  - directory: "my-rock-name/0.1-24.04"
    pro:
      services:
        - esm-apps
        - esm-infra
      config:
        token: secrets.MY_PRO_TOKEN
        artifact-passphrase: secrets.MY_PASSPHRASE
    registries:
      - my-private-registry
Key Description
pro.services Services to enable. Allowed: esm-apps, esm-infra, fips-updates, fips, fips-preview, ros, ros-updates.
pro.config.token secrets.<NAME> of the secret holding the Pro token.
pro.config.artifact-passphrase secrets.<NAME> of the secret holding the encryption passphrase.

Both token and artifact-passphrase are required.

How it works

  1. The build job attaches the Pro token to the runner, packs the rock with the requested services, and detaches the token.
  2. The resulting artifacts are encrypted with the passphrase.
  3. The test and upload jobs decrypt them as needed.

The artifact name includes the enabled services, for example my-rock-0.1-24.04-esm-apps. This is done so Pro and non-Pro builds of the same directory do not collide.

Public repositories

Important

Pro-enabled rocks cannot be uploaded to GHCR from a public repository. The upload job emits a warning and skips the upload instead.

To publish a Pro-enabled rock to GHCR, use an internal or private repository and make sure the REPO_CLONER_TOKEN secret is configured.

From a public repository, you can still build and test Pro-enabled rocks, and publish them to an additional registry that is itself private.

Because the scheduled vulnerability scan pulls images from GHCR, images that are not uploaded there cannot be scanned.

Publishing Pro and non-Pro variants

You can build several variants of the same directory by repeating it with different Pro services:

images:
  - directory: "my-rock-name/0.1-24.04"
  - directory: "my-rock-name/0.1-24.04"
    pro:
      services: [esm-apps]
      config:
        token: secrets.MY_PRO_TOKEN
        artifact-passphrase: secrets.MY_PASSPHRASE

Using a wildcard

With directory: "*", the same pro settings apply to every rock found in the repository. Use explicit directories if only some rocks need Pro services.

Clone this wiki locally