Try build image in ci

This commit is contained in:
Mirco 2024-07-12 13:28:46 +02:00
parent 8d49e4d6cf
commit b7813a14e8

View file

@ -1,6 +1,6 @@
stages:
- test
- builder
# - test
- builjar
- buildimage
# - publish
@ -17,14 +17,13 @@ stages:
- echo ${CI_COMMIT_REF_SLUG}
- apt-get update && apt-get -qqy upgrade
test:
<<: *img
stage: test
when: manual
script:
- ./gradlew test
#test:
# <<: *img
# stage: test
# script:
# - ./gradlew test
builder:
buildjar:
<<: *img
stage: build
script:
@ -38,7 +37,7 @@ builder:
- echo "_____________end_________________"
buildimage:
stage: image
stage: buildimage
image: docker:latest
services:
- docker:dind
@ -47,8 +46,6 @@ buildimage:
before_script:
- echo "---------- BEFORE -------------"
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin
#- export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER
#- export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD
script:
- export DOCKER_BUILDKIT=1
- docker build --tag=moderator-election-vaadin_fullstack --target=ci-image-stage --build-arg BUILDKIT_INLINE_CACHE=1 .
@ -62,4 +59,6 @@ buildimage:
#publish:
# stage: publish
#- export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER
#- export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD