jenkins pipeline
阿新 • • 發佈:2020-12-07
pipeline { agent any stages { stage('common') { //每個stage為一流程,與指令碼式基本一致,每個stage可以定義名稱 steps { //步驟塊,內部包含具體操作 sh 'rm -fr /tmp/jenkins-test;mkdir -p /tmp/jenkins-test' dir('/tmp/jenkins-test'){ sh 'echo 小偉哥的分支:${Branch}' sh'git clone -b ${Branch} https://lixiaoweihan:[email protected]/do1/syeb/yweb/summit/summit-cloud-common.git' sh 'cd summit-cloud-common; mvn install' } } } stage('live'){ steps { //步驟塊,內部包含具體操作 dir('/tmp/jenkins-test'){ sh 'echo 小偉哥的live分支:${Branch}' sh 'git clone -b ${Branch} https://lixiaoweihanLIXIAOWEI@git.pispower1.com.cn/do1/syeb/yweb/summit/summit-cloud-live.git' sh 'cd summit-cloud-live; mvn clean install -pl model,client -am -DskipTests=true' } } } } }