forked from meissa/ModeratorElection
64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
stages:
|
|
# - test
|
|
- builjar
|
|
- buildimage
|
|
# - 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
|
|
|
|
#test:
|
|
# <<: *img
|
|
# stage: test
|
|
# script:
|
|
# - ./gradlew test
|
|
|
|
buildjar:
|
|
<<: *img
|
|
stage: build
|
|
script:
|
|
- ./gradlew clean build -Pvaadin.productionMode
|
|
artifacts:
|
|
name: "ModeratorElection"
|
|
paths:
|
|
- build/libs/ModeratorElection.jar
|
|
expire_in: 1 week
|
|
after_script:
|
|
- echo "_____________end_________________"
|
|
|
|
buildimage:
|
|
stage: buildimage
|
|
image: docker:latest
|
|
services:
|
|
- docker:dind
|
|
dependencies:
|
|
- build
|
|
before_script:
|
|
- echo "---------- BEFORE -------------"
|
|
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin
|
|
script:
|
|
- export DOCKER_BUILDKIT=1
|
|
- docker build --tag=moderator-election-vaadin_fullstack --target=ci-image-stage --build-arg BUILDKIT_INLINE_CACHE=1 .
|
|
artifacts:
|
|
name: "moderator-election-vaadin_fullstack"
|
|
paths:
|
|
- image/
|
|
expire_in: 1 week
|
|
# stage: image
|
|
# script:
|
|
|
|
#publish:
|
|
# stage: publish
|
|
#- export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER
|
|
#- export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD
|
|
|