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

Time spent in {{artifactory.upload}} step is counted towards the previous step

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • artifactory-plugin
    • None
    • Core 2.40 (jenkinsci/jenkins docker image)
      Artifactory 2.8.2

      Bellow is the Pipeline for reproducing the issue. All the time the upload is happening the logs show the fileExists step and when completed all the time is recorded towards the fileExists, which is the step right before the Artifactory upload.

      node {
          deleteDir()
          def server = Artifactory.server "localhost-artifactory"
          stage('Build') {
              sh 'dd if=/dev/zero of=artifact.dat  bs=1M count=1000'
          }
          stage('Release') {
              fileExists "artifact.dat"
              // Behold! Artifactory Upload
              server.upload """{
                  "files": [
                      {
                          "pattern": "artifact.dat",
                          "target": "simple-repo/my-artifact/artifact-${env.BUILD_NUMBER}.dat"
                      }
                  ]
              }"""
          }
      }
      

            eyalbe Eyal Ben Moshe
            duemir Denys Digtiar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: