Skip to content

Commit

Permalink
Uploads SNAPSHOTs with custom settings.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Feb 9, 2020
1 parent 4be7af2 commit a70041b
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pipeline {
label 'ubuntu'
image 'maven:3-jdk-8'
args '-v $HOME/.m2:/root/.m2 -e MAVEN_OPTS="-Xmx1024m" -e USER=$USER'
reuseNode true
}
}
options {
Expand Down Expand Up @@ -55,31 +56,18 @@ pipeline {
sh 'mvn -B source:jar javadoc:jar -DskipAssembbly'
}
}
/*
// see https://cwiki.apache.org/confluence/display/INFRA/Multibranch+Pipeline+recipes#MultibranchPipelinerecipes-DeployingArtifacts
stage('Deploy Snapshot') {
when {
branch 'master'
}
steps {
sh 'mvn -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir deploy'
stash name: 'struts2-build-snapshots', includes: 'local-snapshots-dir/**'
}
}
stage('Upload Snapshot') {
when {
branch 'master'
}
steps {
dir("local-snapshots-dir/") {
deleteDir()
withCredentials([file(credentialsId: 'struts-custom-settings_xml', variable: 'CUSTOM_SETTINGS')]) {
sh 'mvn -s \${CUSTOM_SETTINGS} deploy'
}
unstash name: 'struts2-build-snapshots'
sh 'mvn -f jenkins.pom -X -P deploy-snapshots wagon:upload'
}
}
*/
}
/*
post {
// If this build failed, send an email to the list.
failure {
Expand Down Expand Up @@ -129,4 +117,5 @@ pipeline {
}
}
}
*/
}

0 comments on commit a70041b

Please sign in to comment.