ModeratorElection/.gitlab-ci.yml

65 lines
1.4 KiB
YAML
Raw Normal View History

2024-07-05 06:35:48 +00:00
stages:
2024-07-12 11:28:46 +00:00
# - test
2024-07-12 11:29:29 +00:00
- buildjar
2024-07-12 11:22:55 +00:00
- buildimage
2024-07-11 19:54:15 +00:00
# - publish
2024-07-09 08:40:04 +00:00
.img: &img
2024-07-09 11:31:16 +00:00
image: openjdk:22-jdk-slim
2024-07-09 12:38:56 +00:00
cache:
- key: ${CI_COMMIT_REF_SLUG}
- paths:
2024-07-11 19:54:15 +00:00
- /var/cache/apt
2024-07-09 12:38:56 +00:00
- .gradle/wrapper
- .gradle/caches
2024-07-11 19:54:15 +00:00
before_script:
- echo "___________________START_before_script________________________"
- echo ${CI_COMMIT_REF_SLUG}
- apt-get update && apt-get -qqy upgrade
2024-07-09 12:38:56 +00:00
2024-07-12 11:28:46 +00:00
#test:
# <<: *img
# stage: test
# script:
# - ./gradlew test
2024-07-12 11:28:46 +00:00
buildjar:
<<: *img
2024-07-12 11:31:13 +00:00
stage: buildjar
2024-07-05 06:35:48 +00:00
script:
2024-07-09 11:31:16 +00:00
- ./gradlew clean build -Pvaadin.productionMode
2024-07-11 19:54:15 +00:00
artifacts:
2024-07-12 11:22:55 +00:00
name: "ModeratorElection"
2024-07-11 19:54:15 +00:00
paths:
2024-07-12 11:22:55 +00:00
- build/libs/ModeratorElection.jar
expire_in: 1 week
2024-07-09 11:31:16 +00:00
after_script:
2024-07-09 12:43:53 +00:00
- echo "_____________end_________________"
2024-07-05 06:35:48 +00:00
2024-07-12 11:22:55 +00:00
buildimage:
2024-07-12 11:28:46 +00:00
stage: buildimage
2024-07-12 11:22:55 +00:00
image: docker:latest
services:
- docker:dind
dependencies:
2024-07-12 11:32:25 +00:00
- buildjar
2024-07-12 11:22:55 +00:00
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
2024-07-11 19:56:35 +00:00
# stage: image
# script:
2024-07-11 19:54:15 +00:00
2024-07-11 19:56:35 +00:00
#publish:
# stage: publish
2024-07-12 11:28:46 +00:00
#- export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER
#- export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD