diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3e1506f..476d19b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: