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: