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.
85 lines
2.7 KiB
85 lines
2.7 KiB
pipeline { |
|
agent none |
|
|
|
triggers { |
|
pollSCM 'H/10 * * * *' |
|
upstream(upstreamProjects: "spring-data-commons/master", threshold: hudson.model.Result.SUCCESS) |
|
} |
|
|
|
options { |
|
disableConcurrentBuilds() |
|
} |
|
|
|
stages { |
|
stage("Test") { |
|
parallel { |
|
stage("test: baseline") { |
|
agent { |
|
docker { |
|
image 'adoptopenjdk/openjdk8:latest' |
|
args '-u root -v /var/run/docker.sock:/var/run/docker.sock' // root but with no maven caching |
|
} |
|
} |
|
steps { |
|
sh "./mvnw -Pci,all-dbs clean dependency:list test -Dsort -B" |
|
sh "chown -R 1001:1001 target" |
|
} |
|
} |
|
} |
|
} |
|
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 "./mvnw -Pci,snapshot clean deploy -Dmaven.test.skip=true -B" |
|
} |
|
} |
|
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') |
|
} |
|
|
|
steps { |
|
sh "./mvnw -Pci,snapshot clean deploy -Dmaven.test.skip=true -B" |
|
} |
|
} |
|
} |
|
|
|
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>") |
|
} |
|
} |
|
} |
|
}
|
|
|