Files
tiesheng-springboot/.gitlab-ci.yml
2023-05-11 16:18:53 +08:00

31 lines
726 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
- systemctl stop tieshengboot-ademo
- cp springboot-ademo/target/*.jar /usr/local/nginx/html/demo.tmp.kepai365.ltd/
- systemctl start tieshengboot-ademo
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