This commit is contained in:
Mirco 2024-07-18 11:15:59 +02:00
parent 48f818bc57
commit 0ecf5c2dd8

View file

@ -4,10 +4,16 @@ stages:
- buildimage - buildimage
# - publish # - publish
variables:
CACHE_FALLBACK_KEY: fallback-key
.img: &img .img: &img
image: openjdk:22-jdk-slim image: openjdk:22-jdk-slim
cache: cache:
- key: ${CI_COMMIT_REF_SLUG} - key: ${CI_COMMIT_REF_SLUG}
fallback_keys:
- cache-$CI_DEFAULT_BRANCH
- cache-default
- paths: - paths:
- /var/cache/apt - /var/cache/apt
- .gradle/wrapper - .gradle/wrapper
@ -33,8 +39,6 @@ buildjar:
paths: paths:
- build/libs/ModeratorElection.jar - build/libs/ModeratorElection.jar
expire_in: 1 week expire_in: 1 week
after_script:
- echo "_____________end_________________"
buildimage: buildimage:
stage: buildimage stage: buildimage
@ -47,6 +51,8 @@ buildimage:
- echo "---------- BEFORE -------------" - echo "---------- BEFORE -------------"
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin - echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin
script: script:
- mkdir -p build
- cp build/libs/ModeratorElection.jar build/
- export DOCKER_BUILDKIT=1 - export DOCKER_BUILDKIT=1
- docker build --tag=moderator-election-vaadin_fullstack --target=ci-image-stage --build-arg BUILDKIT_INLINE_CACHE=1 . - docker build --tag=moderator-election-vaadin_fullstack --target=ci-image-stage --build-arg BUILDKIT_INLINE_CACHE=1 .
artifacts: artifacts: