blob: c2d6234bf32384ff85fad672779c9535497ccae6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/
# comments dropped, updated for podman builds
# this variant builds without caching
image: registry.gitlab.com/kraxel/podman-docker-builder:latest
stages:
- build
before_script:
- podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
Build:
stage: build
only:
- branches
script:
- >
podman build
--build-arg VCS_REF=$CI_COMMIT_SHA
--build-arg VCS_URL=$CI_PROJECT_URL
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH
.
- podman push $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH
|