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

Duplicate steps and bogus timing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • latest versions of workflow-api, pipeline, etc

      This was noticed by jglick in the latest pipeline aggregator demo, during the dev phase, when running it (only during the execution of that phase though):

      When you run the stage, which boils down to the below, the first time it runs you see duplicate shell steps showing as runtime of 47+ years, which turns into the correct value after a few seconds:

      stage('Dev') {
          node {
              git 'git://localhost/repo'
              mvn '-o clean package'
              dir('target') {stash name: 'war', includes: 'x.war'}
          }
      }
      def mvn(args) {
          sh "sleep 10 && ${tool 'Maven 3.x'}/bin/mvn ${args}"
      }
      

      I can reproduce duplicate steps like this:

      stage('sample') {
          node {
              echo 'do stuff'
              sh 'sleep 15'
              dir('sample') {
                  sh 'sleep 5'
              }
          }
      }
      

            svanoort Sam Van Oort
            svanoort Sam Van Oort
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: