From 0a238fb67a3e369cccc8d047c378087dfdb37a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=BCmel?= Date: Wed, 24 May 2023 23:31:12 +0200 Subject: [PATCH] gitlab-ci to create container image for usage in gitlab-ci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See: https://docs.gitlab.com/ee/ci/testing/code_quality.html#required-images Signed-off-by: Matthias Blümel --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..d298dd6e8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,15 @@ +image-build: + image: + name: quay.io/buildah/stable:latest + stage: build + before_script: + - 'echo "$CI_REGISTRY_PASSWORD" | buildah login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY' + script: + - buildah bud + -f "Containerfile" + -t "$CI_REGISTRY_IMAGE/codeclimate/codeclimate-openapi:latest" + --layers + --cache-from=$CI_REGISTRY_IMAGE/codeclimate-openapi/cache + --cache-to=$CI_REGISTRY_IMAGE/codeclimate-openapi/cache + . + - buildah push "$CI_REGISTRY_IMAGE/codeclimate-openapi:latest"