Try build image in ci
This commit is contained in:
parent
dceb69a44a
commit
4f67ba3c23
1 changed files with 27 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- build
|
- buildjar
|
||||||
# - image
|
- buildimage
|
||||||
# - publish
|
# - publish
|
||||||
|
|
||||||
.img: &img
|
.img: &img
|
||||||
|
@ -20,24 +20,43 @@ stages:
|
||||||
test:
|
test:
|
||||||
<<: *img
|
<<: *img
|
||||||
stage: test
|
stage: test
|
||||||
|
when: manual
|
||||||
script:
|
script:
|
||||||
- ./gradlew test
|
- ./gradlew test
|
||||||
|
|
||||||
build:
|
buildjar:
|
||||||
<<: *img
|
<<: *img
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- ./gradlew clean build -Pvaadin.productionMode
|
- ./gradlew clean build -Pvaadin.productionMode
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "ModeratorElection.jar"
|
name: "ModeratorElection"
|
||||||
paths:
|
paths:
|
||||||
- build/libs/
|
- build/libs/ModeratorElection.jar
|
||||||
exclude:
|
expire_in: 1 week
|
||||||
- build/libs/ModeratorElection-plain.jar
|
|
||||||
after_script:
|
after_script:
|
||||||
- echo "_____________end_________________"
|
- echo "_____________end_________________"
|
||||||
|
|
||||||
#image:
|
buildimage:
|
||||||
|
stage: image
|
||||||
|
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
|
||||||
|
#- 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 .
|
||||||
|
artifacts:
|
||||||
|
name: "moderator-election-vaadin_fullstack"
|
||||||
|
paths:
|
||||||
|
- image/
|
||||||
|
expire_in: 1 week
|
||||||
# stage: image
|
# stage: image
|
||||||
# script:
|
# script:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue