From e0b804c76ca9b1435dca643bf0a1f98c9cdf14fb Mon Sep 17 00:00:00 2001
From: Tom Teichler <tom.teichler@teckids.org>
Date: Tue, 9 Apr 2024 00:12:21 +0200
Subject: [PATCH] Use kaniko instead of buildaah

---
 .gitlab-ci.yml | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index de41f6c6..3583485a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,11 +14,21 @@ stages:
   - deploy
 
 build:
+  interruptible: true
   stage: build
+  image:
+    name: gcr.io/kaniko-project/executor:debug
+    entrypoint: [""]
   script:
-    - buildah bud -t teckids.org:latest
-  interruptible: true
-  retry: 1
+    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" >/kaniko/.docker/config.json
+    - /kaniko/executor
+       --context $CI_PROJECT_DIR
+       --dockerfile $CI_PROJECT_DIR/Dockerfile
+       --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
+       --cache=true
+       --cleanup
+  only:
+    - master
 
 deploy:
   stage: deploy
-- 
GitLab