mirror of
https://github.com/containers/skopeo.git
synced 2026-02-21 14:42:42 +00:00
Service accounts (a.k.a. robots) in `quay.io` are forcably namespaced to the user or orginization under which they are created. Therefore, it is impossible to use a common login/password to push images for both `skopeo` and `containers` namespaces. Worse, because the authentication is recorded against `quay.io`, multiple login sessions are required. Fix this by adding a function definition which verifies non-empty username/password arguments, before logging in. Call this function as needed from relevant targets, prior to pushing images. Signed-off-by: Chris Evich <cevich@redhat.com>
skopeo container image build with Travis
This document describes the details and requirements to build and publish skopeo container images. The images are published as several architecture specific images and multiarch images on top for upstream and stable versions.
The Travis configuration is available at .travis.yml.
The code to build and publish images is available at release/Makefile and should be used only via Travis.
Travis workflow has 3 major pieces:
local-build- build and test source code locally on osx and linux/amd64 environments, 2 jobs are running in parallelimage-build-push- build and push container images with several Travis jobs running in parallel to build images for several architectures (linux/amd64, linux/s390x, linux/ppc64le). Build part is done for each PR, push part is executed only in case of cron job or master branch update.manifest-multiarch-push- create and push image manifests, which consists of architecture specific images from previous step. Executed only in case of cron job or master branch update.
Ways to have full worklow run
- cron job
- Trigger build from Travis CI
- Update code in master branch
Environment variables
Several environment variables are used to customize image names and keep private credentials to push to quay.io repositories.
Image tags are specified in environment variable and should be manually updated in case of new release.
QUAY_USERNAMEandQUAY_PASSWORDare credentials to push image to corresponding quay.io repositories, should have write permissions. These variables should be specified in Travis.
Variables in .travis.yml
MULTIARCH_MANIFEST_ARCHITECTURESis a list with architecture shortnames, to apprear in final multiarch manifest. The values should fit to architectures used in theimage-build-pushTravis step.STABLE_IMAGE,EXTRA_STABLE_IMAGEare image names to publish stable skopeoUPSTREAM_IMAGEis image name to publish upstream skopeo
Values for environment variables
| Env variable | Value |
|---|---|
| MULTIARCH_MANIFEST_ARCHITECTURES | "amd64 s390x ppc64le" |
| STABLE_IMAGE | quay.io/skopeo/stable:v1.2.0 |
| EXTRA_STABLE_IMAGE | quay.io/containers/skopeo:v1.2.0 |
| UPSTREAM_IMAGE | quay.io/skopeo/upstream:master |