Skip to content
Snippets Groups Projects

Draft: Introduce OCI Step packages

Open Arran Walker requested to merge ajwalker/oci into main
1 unresolved thread

Introduces:

  • Fetching a step via an OCI registry.
  • Packaging and pushing a step via the step-runner oci release command.

Example use

Step project: https://gitlab.com/onlycmds/print. The CI here handles release a step.\

step-runner run ./step.yml:

spec:
  inputs: {}
  outputs: {}
---
run:
  - name: print
    step: oci:onlycmds/print:latest
    inputs:
      format: "hello %v"
      args: ["world"]

Notes:

  • registry.gitlab.com is the default registry, components is the default namespace. Therefore:
    • oci:hello expands registry.gitlab.com/components/hello:latest
    • oci:onlycmds/print expands to registry.gitlab.com/onlycmds/print:latest
    • oci:registry.hub.docker.com/fiveturns/print:0 expands to registry.hub.docker.com/fiveturns/print:0
  • A sub-step path can be provided by separating the artifact from the path with a space ( ):
    • oci:onlycmds/print subdir/ would use test.yml from the subdir/

Packaging a step

Packaging step artifacts requires a strict format on disk. By default, it uses the directory dist.

dist/common adds a layer to the OCI artifact that is common amongst all artifacts. dist/<os>/<arch> adds a layer that is specific to the os/arch platform.

Layers are zstd compressed tarballs with the media type: application/vnd.gitlab.step.layer.v1.tar+zstd

Edited by Arran Walker

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading