Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-7010

Redploy Artifacts as a promotion

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Hudson master on linux & multipule slaves
    • Similar Issues:

      Description

      Description:
      Using promotion plug-in to (re)deploy artifacts as a post build promotion returns 401 (from Nexus Maven repository).

      Steps to reproduce:
      1. Create a maven2 job build, with clean install goals
      2. Add a promotion which will redeploy artifacts upon a successful build (doesn't matter if it's manual or automatic)
      3. run the promotion
      result:
      Return code is: 401
      at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:94)
      at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:119)
      at hudson.maven.reporters.MavenAggregatedArtifactRecord.deploy(MavenAggregatedArtifactRecord.java:79)
      at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:109)
      at hudson.plugins.promoted_builds.Promotion$RunnerImpl.build(Promotion.java:124)
      at hudson.plugins.promoted_builds.Promotion$RunnerImpl.doRun(Promotion.java:103)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)

      Now if you perform "redploy artifacts" from link (in build context) - deploy is successful and running the promotion manually after executing a successful "redeploy artifacts" the promotion succeeds - it seems as if the maven settings isn't being read whilst using the promotion

      => This is a major setback all our release mechanism is based on this deploy promotion.

      Also see: http://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin?focusedCommentId=45482210#comment-45482210

        Attachments

          Issue Links

            Activity

            Hide
            aheritier Arnaud Héritier added a comment -
            Show
            aheritier Arnaud Héritier added a comment - A snapshot including the fix can be downloaded from : https://jenkins.ci.cloudbees.com/job/plugins/job/maven-plugin/170/org.jenkins-ci.main$maven-plugin/
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Arnaud Héritier
            Path:
            pom.xml
            src/test/java/hudson/maven/RedeployPublisherTest.java
            src/test/resources/hudson/maven/settings.xml
            src/test/resources/hudson/maven/simple-pom.xml
            http://jenkins-ci.org/commit/maven-plugin/bd76d488434597baeae70697aa11cb15f744aee4
            Log:
            JENKINS-7010: Maven settings configured at Maven job level aren't used inside the promotion step - Add test case to demonstrate the issue

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Arnaud Héritier Path: pom.xml src/test/java/hudson/maven/RedeployPublisherTest.java src/test/resources/hudson/maven/settings.xml src/test/resources/hudson/maven/simple-pom.xml http://jenkins-ci.org/commit/maven-plugin/bd76d488434597baeae70697aa11cb15f744aee4 Log: JENKINS-7010 : Maven settings configured at Maven job level aren't used inside the promotion step - Add test case to demonstrate the issue
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Arnaud Héritier
            Path:
            src/main/java/hudson/maven/RedeployPublisher.java
            http://jenkins-ci.org/commit/maven-plugin/a2bcad0aab1f347aded7939f90a39e59b4314026
            Log:
            JENKINS-7010: Maven settings configured at Maven job level aren't used inside the promotion step - Fix issue

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Arnaud Héritier Path: src/main/java/hudson/maven/RedeployPublisher.java http://jenkins-ci.org/commit/maven-plugin/a2bcad0aab1f347aded7939f90a39e59b4314026 Log: JENKINS-7010 : Maven settings configured at Maven job level aren't used inside the promotion step - Fix issue
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Olivier Lamy
            Path:
            pom.xml
            src/main/java/hudson/maven/RedeployPublisher.java
            src/test/java/hudson/maven/RedeployPublisherTest.java
            src/test/resources/hudson/maven/settings.xml
            src/test/resources/hudson/maven/simple-pom.xml
            http://jenkins-ci.org/commit/maven-plugin/e32ebce36791e222dd77673f3b780515cd692778
            Log:
            Merge pull request #54 from aheritier/fix/JENKINS-7010

            JENKINS-7010: Maven settings configured at Maven job level aren't used inside the promotion step

            Compare: https://github.com/jenkinsci/maven-plugin/compare/59eb555111f6...e32ebce36791

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: pom.xml src/main/java/hudson/maven/RedeployPublisher.java src/test/java/hudson/maven/RedeployPublisherTest.java src/test/resources/hudson/maven/settings.xml src/test/resources/hudson/maven/simple-pom.xml http://jenkins-ci.org/commit/maven-plugin/e32ebce36791e222dd77673f3b780515cd692778 Log: Merge pull request #54 from aheritier/fix/ JENKINS-7010 JENKINS-7010 : Maven settings configured at Maven job level aren't used inside the promotion step Compare: https://github.com/jenkinsci/maven-plugin/compare/59eb555111f6...e32ebce36791
            Hide
            aheritier Arnaud Héritier added a comment -

            Fixed in 2.13

            Show
            aheritier Arnaud Héritier added a comment - Fixed in 2.13

              People

              • Assignee:
                aheritier Arnaud Héritier
                Reporter:
                hagzag hagzag
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: