Repository navigation
Ubuntu Pro rocks
Rocks can be built with Ubuntu Pro services enabled, for example esm-apps, to include packages with extended security maintenance.
-
An Ubuntu Pro token with access to the services you want.
-
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.
-
A private or internal repository, if you want to upload the rock to GHCR.
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.
- The build job attaches the Pro token to the runner, packs the rock with the requested services, and detaches the token.
- The resulting artifacts are encrypted with the passphrase.
- 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.
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.
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_PASSPHRASEWith directory: "*", the same pro settings apply to every rock found in the repository. Use explicit directories if only some rocks need Pro services.