1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #!groovy
- @Library('jenkinslib') _
- def build = new org.devops.build()
- def color = new org.devops.color()
- String cpu = "${env.cpu}"
- String imagePrefix = "${env.imagePrefix}"
- pipeline {
- agent {
- node {
- label 'master'
- }
- }
- options {
- disableConcurrentBuilds()
- buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '20')
- }
-
- parameters {
- extendedChoice
- quoteValue: true,
- saveJSONParameterToFile: false,
- type: 'PT_CHECKBOX',
- value: 'x86,arm64',
- visibleItemCount: 5
- string
- }
- stages
- stage('MAVEN-BUILD') {
- steps
- script
- color.PrintMes('执行mvn打包', 'green')
-
- build.Build('mvn', 'mvn clean deploy -DskipTests=true', 'master')
- }
- }
- }
- stage('DOCKER-BUILD') {
- steps
- script
-
- build.BuildImage("${cpu}")
- }
- }
- }
- }
-
- post
- success
- wrap([$class: 'BuildUser']) {
- script
- currentBuild.description
- }
- }
- }
- failure
- wrap([$class: 'BuildUser']) {
- script
- currentBuild.description
- }
- }
- }
- unstable
- wrap([$class: 'BuildUser']) {
- script
- currentBuild.description
- }
- }
- }
- }
- }
|