1. 程式人生 > >pipeline 釋出war包

pipeline 釋出war包

pipline 寫法分為 指令碼式和宣告式,下面採用指令碼式程式設計:

node {

stage('checkout') {
echo '開始檢出程式碼'
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'e83d9b3c-9ce8-4999-8d69-0f779f106545', url: '[email protected]

']]])
}
stage('copyconfig') {
echo '開始複製配置檔案'
sh ''' 配置生產配置檔案'''
}
stage('Build') {
echo '開始構建'
sh '/usr/local/apache-maven-3.5.3/bin/mvn clean package'
}
stage('ReadyWar'){
sh returnStatus: true, script: '''這裡釋出多個war,通過shell尋找war包 '''

}

stage('deploy'){
sh returnStatus: true, script: ''這裡通過指令碼在docker宿主編譯映象或者啟動容器 '''

}


}