Skip to Content

GitLab CI/CD

The component in templates/gitlab/justshipped.yml adds one job that runs Just Shipped in its Docker image and keeps the release bundle (releases/) as a job artifact.

Usage

In the .gitlab-ci.yml of the Pebble repository (example/pebble):

include:
  - remote: https://raw.githubusercontent.com/cwaits6/justshipped/1.2.3/templates/gitlab/justshipped.yml
    inputs:
      image_version: "1.2.3"

Pin the URL to a tag or a commit SHA, and set image_version to the same release, so the job definition and the image never change under you.

Once the component is in the GitLab CI/CD Catalog, the include becomes:

include:
  - component: gitlab.com/<namespace>/justshipped/justshipped@1.2.3
    inputs:
      image_version: "1.2.3"

The catalog entry does not exist yet; use include: remote: until it does. GitLab names a catalog component after its file directly in the project's templates/ folder, so the GitLab project carries this file as templates/justshipped.yml.

Inputs

InputDefaultWhat it does
argsgenerateArguments passed to justshipped. Only letters, digits, spaces, and ._=/:,@+- are accepted, because the value is placed in the job's shell script.
image_versionlatestTag of the ghcr.io/cwaits6/justshipped image to run. Must be a valid image tag.
stagedeployPipeline stage the job runs in. Use a stage your pipeline defines.

Running only on tags

The job is named justshipped. Add keys to it in your own .gitlab-ci.yml, such as a rule that runs it only for a tag:

include:
  - remote: https://raw.githubusercontent.com/cwaits6/justshipped/1.2.3/templates/gitlab/justshipped.yml
    inputs:
      image_version: "1.2.3"

justshipped:
  rules:
    - if: $CI_COMMIT_TAG

Secrets

Just Shipped reads secrets by environment variable name only. For AI, add the provider key (such as ANTHROPIC_API_KEY) as a masked and protected CI/CD variable under Settings > CI/CD > Variables; the job sees it as an environment variable. Without a provider key the run is rules-only.

The bundle

The job saves releases/ as an artifact. Download it from the job page or the pipeline's artifacts menu: the folder is the complete result.

Notes

  • The job sets GIT_DEPTH: "0", because the release range is resolved from the full history and tags.
  • The image runs as a non-root user. GitLab's Docker and Kubernetes executors make the checkout writable for any user by default; if your runner changes that (FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR), the job needs write access to the project directory to save releases/.
  • The image carries Chromium, which screenshots use.
Edit on GitHub

On this page