Mirrors an OCI image from a source registry to a destination registry with skopeo copy.
Variables
| Name | required | type | Hints |
|---|---|---|---|
| CI_REGISTRY_USER | required | string | GitLab container registry user. Provided by GitLab CI. |
| CI_REGISTRY_PASSWORD | required | string | GitLab container registry password. Provided by GitLab CI. |
Usage
Create GitLab pipeline file .gitlab-ci.yml:
include:
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/common@stable
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/oci-mirror@stable
inputs:
source: registry.access.redhat.com/ubi10/ubi:latest
target: $CI_REGISTRY_IMAGE:ubi-latest
By default the mirror job runs only for tags. Override rules when the mirror should run for branches or merge requests.
Set remove-signatures: true when the destination registry cannot store source image signature attachments.
Inputs
| Name | Description | Default | Type |
| --- | --- | --- | --- |
| name | oci | string | |
| needs | The jobs that this job depends on. | [] | array |
| remove-signatures | Remove source image signatures while copying. Enable this when the destination registry cannot store signature attachments. | false | boolean |
| rules | The rules that this job depends on. | [{"if":"$CI_COMMIT_TAG","when":"always"},{"when":"never"}] | array |
| source | The source repository to mirror. | string | |
| stage | The pipeline stage that the jobs belongs to. | deploy | string |
| tags | The runners that this job depends on. | [] | array |
| target | The destination repository to mirror. | string |