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

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

    • 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"
                      }
                  ]
              }"""
          }
      }
      

          [JENKINS-41097] Time spent in {{artifactory.upload}} step is counted towards the previous step

          Denys Digtiar created issue -
          Denys Digtiar made changes -
          Remote Link New: This issue links to "HAP-870 (Web Link)" [ 15269 ]
          Denys Digtiar made changes -
          Description Original: 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.

          {code}
          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": "dump/cloudbees/ZD-43888/artifact-${env.BUILD_NUMBER}.dat"
                          }
                      ]
                  }"""
              }
          }
          {code}
          New: 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.

          {code}
          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"
                          }
                      ]
                  }"""
              }
          }
          {code}
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal OSS-1854 (Web Link)" [ 18538 ]

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

              Created:
              Updated: