include: http://172.18.15.16:30009/devops/v1/projects/565214132069076992/ci_contents/pipelines/a0704533-f715-4400-b2ae-fa6d3da15f4b/content.yaml

#include: http://172.18.15.16:30009/devops/v1/projects/565214132069076992/ci_contents/pipelines/5db69f70-7f49-4d1c-8cf7-24db0799dec6/content.yaml
#
##image: registry.cn-hangzhou.aliyuncs.com/choerodon-tools/cibase:0.5.0
##
##stages:
##  - mvn-package
##  - docker-build
##
##maven-test-branches:
##  stage: mvn-package
##  script:
##    - git_merge develop
##    - mvn package -U -DskipTests=true
##  only:
##    - branches
##  except:
##    - master
##    - tags
##    - develop
##    - /^release-.*$/
##    - /^hotfix-.*$/
##
##maven-test-docker:
##  stage: mvn-package
##  script:
##    - update_pom_version
##    - mvn package -U -DskipTests=true
##    - mkdir -p /cache/${CI_PROJECT_NAME}-${CI_PROJECT_ID}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
##    - cp target/app.jar /cache/${CI_PROJECT_NAME}-${CI_PROJECT_ID}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}/app.jar
##  only:
##    - tags
##    - master
##    - /^release-.*$/
##    - /^hotfix-.*$/
##
##docker-build:
##  stage: docker-build
##  script:
##    - docker_build
##    - chart_build
##  only:
##    - tags
##    - master
##    - /^release-.*$/
##    - /^hotfix-.*$/
##
##.auto_devops: &auto_devops |
##    curl -o .auto_devops.sh \
##        "${CHOERODON_URL}/devops/ci?token=${Token}&type=microservice"
##    if [ $? -ne 0 ];then
##      cat .auto_devops.sh
##      exit 1
##    fi
##    source .auto_devops.sh
##    function docker_build(){
##        cp /cache/${CI_PROJECT_NAME}-${CI_PROJECT_ID}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}/app.jar ${1:-"src/main/docker"}/app.jar || true
##        docker build --pull -t ${DOCKER_REGISTRY}/${GROUP_NAME}/${PROJECT_NAME}:${CI_COMMIT_TAG} ${1:-"src/main/docker"}
##        docker push ${DOCKER_REGISTRY}/${GROUP_NAME}/${PROJECT_NAME}:${CI_COMMIT_TAG}
##        rm -rf /cache/${CI_PROJECT_NAME}-${CI_PROJECT_ID}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
##    }
##
##before_script:
##  - *auto_devops