aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-08-06 14:10:33 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-08-06 14:10:33 +0200
commit566339e5d16fb47538a70f3f80a67683d48a4d1d (patch)
treefef492a02d548625e65ca0afca1adc04c75b4668 /.gitlab-ci.yml
downloadrpm-package-builder-566339e5d16fb47538a70f3f80a67683d48a4d1d.tar.gz
centos7: initial commit
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..c2d6234
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,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
+