Recombining build and deploy phase

Getting errors when deploy is run in second call.
This commit is contained in:
Martin Stockhammer 2018-05-02 17:25:00 +02:00
parent 91274a1281
commit 3732f2e072
1 changed files with 4 additions and 22 deletions

26
Jenkinsfile vendored
View File

@ -48,13 +48,15 @@ pipeline {
// -Dmaven.compiler.fork=false: Do not compile in a separate forked process
// -Dmaven.test.failure.ignore=true: Do not stop, if some tests fail
// -Pci-build: Profile for CI-Server
sh "mvn clean install -B -U -e -fae -Dmaven.test.failure.ignore=true -T2 -Dmaven.compiler.fork=false -Pci-build"
sh "mvn clean deploy -B -U -e -fae -Dmaven.test.failure.ignore=true -T2 -Dmaven.compiler.fork=false -Pci-build"
}
}
}
post {
success {
always {
junit testDataPublishers: [[$class: 'StabilityTestDataPublisher']], testResults: '**/target/surefire-reports/TEST-*.xml'
}
success {
archiveArtifacts '**/target/*.war,**/target/*-bin.zip'
}
failure {
@ -63,26 +65,6 @@ pipeline {
}
}
stage('Deploy') {
steps {
timeout(120) {
withMaven(maven: buildMvn, jdk: buildJdk,
mavenSettingsConfig: deploySettings,
mavenLocalRepo: ".repository",
options: [artifactsPublisher(disabled: true), junitPublisher(disabled: true, ignoreAttachments: false)]
)
{
sh "mvn deploy -B -Dmaven.test.skip=true"
}
}
}
post {
failure {
notifyBuild("Deploy failure")
}
}
}
}
post {
unstable {