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

Redploy Artifacts as a promotion

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: promoted-builds-plugin
    • Labels:
      None
    • Environment:
      Hudson master on linux & multipule slaves

      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

        Activity

        Hide
        mturra mturra added a comment -

        I have the same issue.
        I put server credential into settings.xml via "Config File Provider Plugin" and "Default global settings provider" configuration.
        But it didn't work.

        I configured the user credential in the "Credential" configuration using a domain with specification "Maven ServerId" and another with specification "Hostname", but both of these configuration failed.

        I get this stack trace:
        Return code is: 401, ReasonPhrase: Unauthorized.
        at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:143)
        at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:193)
        at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:176)

        Where the "Deploy maven artifacts to Maven repository" action is supposed to read the credential to upload artifact to the repository?

        Show
        mturra mturra added a comment - I have the same issue. I put server credential into settings.xml via "Config File Provider Plugin" and "Default global settings provider" configuration. But it didn't work. I configured the user credential in the "Credential" configuration using a domain with specification "Maven ServerId" and another with specification "Hostname", but both of these configuration failed. I get this stack trace: Return code is: 401, ReasonPhrase: Unauthorized. at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:143) at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:193) at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:176) Where the "Deploy maven artifacts to Maven repository" action is supposed to read the credential to upload artifact to the repository?

          People

          • Assignee:
            Unassigned
            Reporter:
            hagzag hagzag
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: