From 0ecf5c2dd89bb46bf0a704bdce58895b0fa8a21d Mon Sep 17 00:00:00 2001 From: Mirco Date: Thu, 18 Jul 2024 11:15:59 +0200 Subject: [PATCH] Fix ci --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3e97f80..7eaf0b1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,10 +4,16 @@ stages: - buildimage # - publish +variables: + CACHE_FALLBACK_KEY: fallback-key + .img: &img image: openjdk:22-jdk-slim cache: - key: ${CI_COMMIT_REF_SLUG} + fallback_keys: + - cache-$CI_DEFAULT_BRANCH + - cache-default - paths: - /var/cache/apt - .gradle/wrapper @@ -33,8 +39,6 @@ buildjar: paths: - build/libs/ModeratorElection.jar expire_in: 1 week - after_script: - - echo "_____________end_________________" buildimage: stage: buildimage @@ -47,6 +51,8 @@ buildimage: - echo "---------- BEFORE -------------" - echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin script: + - mkdir -p build + - cp build/libs/ModeratorElection.jar build/ - export DOCKER_BUILDKIT=1 - docker build --tag=moderator-election-vaadin_fullstack --target=ci-image-stage --build-arg BUILDKIT_INLINE_CACHE=1 . artifacts: