stages:
- deploy
- build
- ops
deploy-web1_job:
stage: deploy
tags:
- gitRunner的tag标签
only:
- master
script:
- bash deploy 项目分组名 项目名 master
build-web1_job:
stage: build
tags:
- gitRunner的tag标签
only:
- master
script:
- source /etc/profile
- cd /data/wwwroot/master/项目分组名/项目名
- /data/wwwroot/apache-maven-3.6.0/bin/mvn clean package -Dmaven.test.skip=true
ops-web1_job:
stage: ops
tags:
- gitRunner的tag标签
only:
- master
script:
- rm -f /data/wwwroot/tomcat/apache-tomcat-8.5.35/webapps/项目名.war
- cp /data/wwwroot/master/项目分组名/项目名/target/项目名.war /data/wwwroot/tomcat/apache-tomcat-8.5.35/webapps/项目名.war