You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.6 KiB
80 lines
2.6 KiB
pipeline { |
|
agent none |
|
|
|
triggers { |
|
pollSCM 'H/10 * * * *' |
|
} |
|
|
|
stages { |
|
stage("Test") { |
|
parallel { |
|
stage("test: baseline") { |
|
agent { |
|
docker { |
|
image 'adoptopenjdk/openjdk8:latest' |
|
args '-v $HOME/.m2:/root/.m2' |
|
} |
|
} |
|
steps { |
|
sh "PROFILE=none ci/test.sh" |
|
} |
|
} |
|
} |
|
} |
|
stage('Release to artifactory') { |
|
when { |
|
branch 'issue/*' |
|
} |
|
agent { |
|
docker { |
|
image 'adoptopenjdk/openjdk8:latest' |
|
args '-v $HOME/.m2:/root/.m2' |
|
} |
|
} |
|
|
|
environment { |
|
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') |
|
} |
|
|
|
steps { |
|
sh "USERNAME=${ARTIFACTORY_USR} PASSWORD=${ARTIFACTORY_PSW} DOC_USERNAME=${DOC_USR} DOC_PASSWORD=${DOC_PSW} PROFILE=ci,snapshot ci/build.sh" |
|
} |
|
} |
|
stage('Release to artifactory with docs') { |
|
when { |
|
branch 'master' |
|
} |
|
agent { |
|
docker { |
|
image 'adoptopenjdk/openjdk8:latest' |
|
args '-v $HOME/.m2:/root/.m2' |
|
} |
|
} |
|
|
|
environment { |
|
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') |
|
DOC = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') |
|
} |
|
|
|
steps { |
|
sh "USERNAME=${ARTIFACTORY_USR} PASSWORD=${ARTIFACTORY_PSW} DOC_USERNAME=${DOC_USR} DOC_PASSWORD=${DOC_PSW} PROFILE=ci,snapshot ci/build.sh" |
|
} |
|
} |
|
} |
|
|
|
post { |
|
changed { |
|
script { |
|
slackSend( |
|
color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger', |
|
channel: '#spring-data-dev', |
|
message: "${currentBuild.fullDisplayName} - `${currentBuild.currentResult}`\n${env.BUILD_URL}") |
|
emailext( |
|
subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}", |
|
mimeType: 'text/html', |
|
recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']], |
|
body: "<a href=\"${env.BUILD_URL}\">${currentBuild.fullDisplayName} is reported as ${currentBuild.currentResult}</a>") |
|
} |
|
} |
|
} |
|
}
|
|
|