2022-08-20 23:27:15 +00:00
|
|
|
---
|
|
|
|
pipeline:
|
|
|
|
build-images:
|
2022-09-03 11:21:10 +00:00
|
|
|
image: quay.io/buildah/stable
|
|
|
|
privileged: true # Only needed when running under docker; on podman it can be dropped
|
|
|
|
environment:
|
|
|
|
- STORAGE_DRIVER=vfs
|
2022-08-20 23:27:15 +00:00
|
|
|
commands:
|
2022-09-03 11:21:10 +00:00
|
|
|
- buildah build --platform=linux/amd64,linux/arm64,linux/arm --manifest $CI_REPO_NAME -f Dockerfile .
|
|
|
|
- buildah login -u $CONTAINER_REPO_USERNAME -p $CONTAINER_REPO_PASSWORD git.worn.eu
|
|
|
|
- buildah manifest push --all $CI_REPO_NAME docker://git.worn.eu/$CI_REPO:git-$${CI_COMMIT_SHA::10}
|
|
|
|
- buildah manifest push --all $CI_REPO_NAME docker://git.worn.eu/$CI_REPO:ci-$CI_BUILD_NUMBER
|
|
|
|
- test "$CI_COMMIT_BRANCH" == "$CI_REPO_DEFAULT_BRANCH" && buildah manifest push --all $CI_REPO_NAME docker://git.worn.eu/$CI_REPO:latest
|
2022-08-20 23:31:49 +00:00
|
|
|
- echo Done
|
2022-08-21 08:29:32 +00:00
|
|
|
when:
|
|
|
|
event: push
|
|
|
|
secrets:
|
|
|
|
- container_repo_username
|
|
|
|
- container_repo_password
|
|
|
|
tag-images:
|
|
|
|
image: registry.access.redhat.com/ubi9/skopeo
|
|
|
|
commands:
|
|
|
|
- skopeo login -u $CONTAINER_REPO_USERNAME -p $CONTAINER_REPO_PASSWORD git.worn.eu
|
|
|
|
- skopeo copy -a docker://git.worn.eu/$CI_REPO:git-$${CI_COMMIT_SHA::10} docker://git.worn.eu/$CI_REPO:$${CI_COMMIT_TAG##v}
|
|
|
|
when:
|
|
|
|
event: tag
|
2022-08-20 23:27:15 +00:00
|
|
|
secrets:
|
|
|
|
- container_repo_username
|
|
|
|
- container_repo_password
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- lint
|