Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1227

unable to promote artifact from jenkins pipeline

    XMLWordPrintable

    Details

    • Type: Support Ticket
    • Status: Open
    • Priority: 2 - Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.16.2
    • Fix Version/s: None
    • Component/s: Gradle
    • Environment:

      We are having Jenkins pipelines exists in our environment for building the artifacts(Gradle used here).  

      Description

      I am using below code for Artifactory promotion using Jenkins pipeline job.

      timeout(time: 48000, unit: 'SECONDS', activity: false) {
      node("${env.node}") {
      stage('Promote-Artifacts') {
      script

      { def server = Artifactory.server 'artifactory' def artifactPromotionConfig = [ 'buildName' : '<job_Name>', 'sourceRepo' : '<source_Repo>', 'buildNumber' : '<Build_Id>', 'targetRepo' : '<target_Repo>', 'status' : 'Released', 'includeDependencies': false, 'copy' : true, 'comment' : 'this is the promotion comment'] server.promote(artifactPromotionConfig) }


      }
      }
      }

       
      --------------------------------------------------------------------------------
       

      I am facing the below error in execution...

      Running in Durability level: MAX_SURVIVABILITY[Pipeline] timeoutTimeout set to expire in 13 hr[Pipeline] {[Pipeline] nodeRunning on
      linux5
      in /home/jenkins/workspace/PromoteTesting[Pipeline] {[Pipeline] stage[Pipeline] { (Promote-Artifacts)[Pipeline] script[Pipeline] {[Pipeline] getArtifactoryServer[Pipeline] artifactoryPromoteBuildPromoting '<Job_Name>' #<Build_Id> to '<Target_Repo>' from '<Source_Repo>', with status: 'Released', with comment: 'this is the promotion comment', using copy, failing on first error.
      Performing dry run promotion (no changes are made during dry run) ...
      ERROR: Promotion failed during dry run (no change in Artifactory was done): HTTP/1.1 400 Bad Request
      {
      "messages" : [

      { "level" : "WARNING", "message" : "Unable to translate path '<source_Repo>/<folder1>/<Job_Name>/<Build_Id>/deployment/configuration-utility/build/distributions/configuration-utility-<BranchName>-436.tar': does not represent a valid module path within the source." }

      , {
      "level" : "INFO",
      "message" : "Skipping promotion status update: item promotion was completed with errors and warnings."
      } ]
      }
      ERROR: Promotion failed due to Artifactory response.[Pipeline] }[Pipeline] // script[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // node[Pipeline] }[Pipeline] // timeout[Pipeline] End of Pipelinejava.lang.Exception: Build promotion failed
      at org.jfrog.hudson.pipeline.common.executors.PromotionExecutor.execute(PromotionExecutor.java:59)
      at org.jfrog.hudson.pipeline.scripted.steps.PromoteBuildStep$Execution.run(PromoteBuildStep.java:69)
      at org.jfrog.hudson.pipeline.scripted.steps.PromoteBuildStep$Execution.run(PromoteBuildStep.java:38)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      at hudson.security.ACL.impersonate(ACL.java:290)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE

      Please let me know the solution on same.

        Attachments

          Activity

            People

            Assignee:
            eyalb Eyal Ben Moshe
            Reporter:
            smn70110@gmail.com saurabh mathur
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: