Fixes build and nexus deployment

This commit is contained in:
Sebastian Sdorra 2017-09-26 16:34:57 +02:00
parent 3b471b46c5
commit 63d5dd3299

8
Jenkinsfile vendored
View file

@ -3,7 +3,7 @@ node {
cesFqdn = "ecosystem.cloudogu.net"; cesFqdn = "ecosystem.cloudogu.net";
cesUrl = "https://${cesFqdn}"; cesUrl = "https://${cesFqdn}";
credentials = usernamePassword(credentialsId: 'system', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME'); credentials = usernamePassword(credentialsId: 'scmCredentials', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME');
stage('Checkout') { stage('Checkout') {
checkout scm checkout scm
@ -49,9 +49,7 @@ def credentials;
void mvn(String args) { void mvn(String args) {
writeSettingsXml() writeSettingsXml()
withEnv(["JAVA_HOME=${tool 'jdk8u112'}"]) { sh "./mvnw -s settings.xml --batch-mode -V -U -e -Dsurefire.useFile=false ${args}"
sh "./mvnw -s settings.xml --batch-mode -V -U -e -Dsurefire.useFile=false ${args}"
}
sh 'rm -f settings.xml' sh 'rm -f settings.xml'
} }
@ -71,7 +69,7 @@ void writeSettingsXml() {
<mirror> <mirror>
<id>${cesFqdn}</id> <id>${cesFqdn}</id>
<name>${cesFqdn} Central Mirror</name> <name>${cesFqdn} Central Mirror</name>
<url>${cesFqdn}/nexus/content/groups/public/</url> <url>${cesUrl}/nexus/content/groups/public</url>
<mirrorOf>central</mirrorOf> <mirrorOf>central</mirrorOf>
</mirror> </mirror>
</mirrors> </mirrors>