sri7654

.pwslab.yml

Sep 22nd, 2020
708
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stages:
  2.  - build1
  3.   - build2
  4.        
  5. build1:    
  6.   stage: build1
  7.   image: maven:3.3.9-jdk-8
  8.   script:
  9.    - mvn clean package
  10.   artifacts:
  11.     paths:
  12.      - pkg/demo.war
  13.      
  14. build2:
  15.   stage: build2
  16.   image: docker:stable
  17.   services:
  18.    - docker:dind
  19.   before_script:
  20.    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  21.   script:
  22.    - docker build --pull -t "$CI_REGISTRY_IMAGE" .
  23.     - docker push "$CI_REGISTRY_IMAGE"
  24.   only:
  25.    - master
  26.  
RAW Paste Data