29 lines
645 B
YAML
29 lines
645 B
YAML
stages:
|
|
- deploy
|
|
- package
|
|
|
|
build-jar:
|
|
stage: deploy
|
|
tags:
|
|
- hzkepai
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == "master"
|
|
script:
|
|
- mvn clean package -Dmaven.test.skip=true
|
|
- cp springboot-ademo/target/*.jar /usr/local/nginx/html/demo.tmp.kepai365.ltd/
|
|
|
|
deploy-jar:
|
|
stage: deploy
|
|
tags:
|
|
- hzkepai
|
|
rules:
|
|
- if: $CI_COMMIT_TAG
|
|
script:
|
|
- mvn clean deploy -Dmaven.test.skip -DaltDeploymentRepository=master::default::file:$TAG_REPO_FOLDER
|
|
- cd $TAG_REPO_FOLDER
|
|
- git checkout master
|
|
- git pull
|
|
- git add .
|
|
- git commit -m "deploy $CI_PROJECT_NAME $CI_COMMIT_TAG"
|
|
- git push origin master
|