forked from meissa/ModeratorElection
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:
|
||||
- test
|
||||
- build
|
||||
# - image
|
||||
- buildjar
|
||||
- buildimage
|
||||
# - publish
|
||||
|
||||
.img: &img
|
||||
|
@ -20,24 +20,43 @@ stages:
|
|||
test:
|
||||
<<: *img
|
||||
stage: test
|
||||
when: manual
|
||||
script:
|
||||
- ./gradlew test
|
||||
|
||||
build:
|
||||
buildjar:
|
||||
<<: *img
|
||||
stage: build
|
||||
script:
|
||||
- ./gradlew clean build -Pvaadin.productionMode
|
||||
artifacts:
|
||||
name: "ModeratorElection.jar"
|
||||
name: "ModeratorElection"
|
||||
paths:
|
||||
- build/libs/
|
||||
exclude:
|
||||
- build/libs/ModeratorElection-plain.jar
|
||||
- build/libs/ModeratorElection.jar
|
||||
expire_in: 1 week
|
||||
after_script:
|
||||
- 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
|
||||
# script:
|
||||
|
||||
|
|
Loading…
Reference in a new issue