aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-08-06 13:53:05 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-08-06 13:53:05 +0200
commit7e3acc0e9c694e1a0ed56f9b0676cde7d7474036 (patch)
treeb6f90bb2e5d6ebec557a0963ce83b22e29deac0b
downloadrpm-package-builder-7e3acc0e9c694e1a0ed56f9b0676cde7d7474036.tar.gz
centos8: initial commit
-rw-r--r--.gitlab-ci.yml25
-rw-r--r--Dockerfile22
2 files changed, 47 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
+
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..8aecb6c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,22 @@
+FROM centos:8
+
+ENV SUMMARY="CentOS 8 builder" \
+ DESCRIPTION="CentOS 8 image for test builds and rpm package builds."
+
+LABEL maintainer="Gerd Hoffmann <kraxel@redhat.com>" \
+ summary="${SUMMARY}" \
+ description="${DESCRIPTION}"
+
+USER root
+
+RUN dnf update -y && \
+ dnf install -y \
+ 'dnf-command(builddep)' \
+ 'dnf-command(config-manager)' \
+ https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \
+ && \
+ dnf config-manager --set-enabled PowerTools && \
+ dnf install -y \
+ fedora-packager \
+ && \
+ dnf clean all -y