gitlab+jenkins+maven+docker持续集成(七)——.Jenkins Pipeline持续集成
node{stage('get clone'){ //check CODE
git credentialsId: 'f3eb1fea-42b0-46b2-8342-a2be6a65fe73', url: 'http://xx.xx.xx/xx/qd_api.git'
}
stage('mvn test'){
withMaven(
maven: 'M3') {
sh "mvn test"
}
}
stage('mvn build'){ //mvn构建
withMaven(
maven: 'M3',
mavenLocalRepo: '.repository') {
sh "mvn clean install -Dmaven.test.skip=true"
}
}
stage('deploy'){ //执行部署脚本
echo "deploy ......"
}
}
页:
[1]