From d967c984406c8d983b621f638a8e5e5f20711491 Mon Sep 17 00:00:00 2001 From: Mirco Date: Thu, 11 Jul 2024 21:54:15 +0200 Subject: [PATCH] Try to cache and build artifact --- .gitlab-ci.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d4a969..d6c3d79 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,18 +1,21 @@ stages: - test - build +# - image +# - publish .img: &img image: openjdk:22-jdk-slim + cache: + - key: ${CI_COMMIT_REF_SLUG} + - paths: + - /var/cache/apt + - .gradle/wrapper + - .gradle/caches before_script: - echo "___________________START_before_script________________________" - echo ${CI_COMMIT_REF_SLUG} - apt-get update && apt-get -qqy upgrade - cache: - - key: ${CI_COMMIT_REF_SLUG} - - paths: - - .gradle/wrapper - - .gradle/caches test: <<: *img @@ -25,7 +28,20 @@ build: stage: build script: - ./gradlew clean build -Pvaadin.productionMode + artifacts: + name: "ModeratorElection.jar" + paths: + - build/libs/ + exclude: + - build/libs/ModeratorElection-plain.jar after_script: - echo "_____________end_________________" +image: + stage: image + script: + - + +publish: + stage: publish