Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stages:
- - build1
- - build2
- build1:
- stage: build1
- image: maven:3.3.9-jdk-8
- script:
- - mvn clean package
- artifacts:
- paths:
- - pkg/demo.war
- build2:
- stage: build2
- image: docker:stable
- services:
- - docker:dind
- before_script:
- - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- script:
- - docker build --pull -t "$CI_REGISTRY_IMAGE" .
- - docker push "$CI_REGISTRY_IMAGE"
- only:
- - master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement