OCI Push

Packs the files of an event into a single-layer OCI artifact and pushes it to a registry under one or more tags. The layer is a tar+gzip of the files at their paths, which is the layout OCI Sync reads back.

The input event carries files, each {path, content}; the output of Git Push fits as it is. Paths must be relative, without .., and unique. The manifest uses the OCI empty config and the artifact type application/vnd.connve.flowgen.files.v1. Pushes from one task run one at a time.

Configuration

- oci_push:
    name: release
    repository: "{{env.OCI_REPOSITORY}}"
    tags: ["{{event.data.commit}}", "latest"]
    annotations:
      org.opencontainers.image.source: "{{env.GIT_REPOSITORY_URL}}"
      org.opencontainers.image.revision: "{{event.data.commit}}"
    credentials_path: /etc/registry/credentials.json

Fields

FieldTypeDefaultDescription
namestringrequiredTask name.
repositorystringrequiredRegistry and repository without a tag, e.g. registry.example.com/team/configs.
tagslistrequiredTags to push the artifact under, at least one. Supports templating. Every tag is checked before anything is pushed.
annotationsmapManifest annotations. Supports templating. For example, org.opencontainers.image.source names the source repository, which some registries use to link the package to it, and org.opencontainers.image.revision the commit. Annotations are part of the manifest, so they change its digest.
credentials_pathstringRegistry credentials, in either format OCI Sync accepts.
depends_onlistUpstream task names.
retryobjectRetry configuration.

Tagging every release with an immutable tag (such as the commit SHA) next to a moving one lets consumers follow the moving tag while any release can be promoted or rolled back by its own tag.

Output

The input data, with files replaced by:

FieldTypeDescription
digeststringManifest digest, the same under every tag.
referencesarrayEvery reference pushed, <repository>:<tag>.

Examples