You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2018/04/07 11:19:23 UTC

[GitHub] olamy closed pull request #1: auto deploy if we are currently on master branch

olamy closed pull request #1: auto deploy if we are currently on master branch
URL: https://github.com/apache/maven-jenkins-lib/pull/1
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/vars/asfMavenTlpStdBuild.groovy b/vars/asfMavenTlpStdBuild.groovy
index 2aeca74..4e176d0 100644
--- a/vars/asfMavenTlpStdBuild.groovy
+++ b/vars/asfMavenTlpStdBuild.groovy
@@ -58,7 +58,13 @@ def call(Map params = [:]) {
           cmd += '-Dfindbugs.skip=true'
         }
         cmd += 'clean'
-        cmd += 'verify'
+        def branchName = "${env.BRANCH_NAME}"
+        if(branchName == "master") {
+          cmd += 'deploy'   
+          cmd += "-DdeployAtEnd=true"
+        } else {
+          cmd += 'verify'        
+        } 
         def disablePublishers = !first
         first = false
         String stageId = "${os}-jdk${jdk}"
@@ -85,15 +91,17 @@ def call(Map params = [:]) {
               if (failingFast != null) {
                 echo "[FAIL FAST] ${failingFast} has failed. Skipping ${stageId}."
               } else try {
-                withMaven(jdk:jdkName, maven:mvnName, mavenLocalRepo:'.repository', options: [
-                  artifactsPublisher(disabled: disablePublishers),
-                  junitPublisher(ignoreAttachments: false),
-                  findbugsPublisher(disabled: disablePublishers),
-                  openTasksPublisher(disabled: disablePublishers),
-                  dependenciesFingerprintPublisher(),
-                  invokerPublisher(),
-                  pipelineGraphPublisher()
-                ]) {
+                withMaven(jdk:jdkName, maven:mvnName, mavenLocalRepo:'.repository', 
+                          mavenSettingsConfig: 'simple-deploy-settings-no-mirror',
+                          options: [
+                            artifactsPublisher(disabled: disablePublishers),
+                            junitPublisher(ignoreAttachments: false),
+                            findbugsPublisher(disabled: disablePublishers),
+                            openTasksPublisher(disabled: disablePublishers),
+                            dependenciesFingerprintPublisher(),
+                            invokerPublisher(),
+                            pipelineGraphPublisher()
+                          ]) {
                 dir ('m') {
                     if (isUnix()) {
                       sh cmd.join(' ')
@@ -153,4 +161,4 @@ def call(Map params = [:]) {
       jenkinsNotify()
     }
   }
-}
\ No newline at end of file
+}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services