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

p4publish in pipeline job breaks stage timing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • p4-plugin, pipeline
    • None
    • Jenkins ver. 2.7
      Pipeline 2.2
      P4 Plugin 1.4.4

      When i add p4publish step in pipeline groovy script, stage with publish step always has wrong execution time (few microseconds), and all time always added to previous stage block.

      Minimal code to reproduce:

      timestamps {
          node("windows") {
              stage 'a'
              sleep 10
              stage 'p4 sync'
              p4sync <some settings>
              stage 'b'
              sleep 10
              stage 'p4 submit'
              p4publish <some settings>
              stage 'c'
              sleep 10
          }
      }
      

      When i change p4publish to "sleep 1", stage b - 10s, but with p4publish stage b - 33s

      in console output

      ...
      [Pipeline] stage (b)
      00:00:33.766 Entering stage b
      00:00:33.766 Proceeding
      [Pipeline] sleep
      00:00:33.769 Sleeping for 10 sec
      [Pipeline] stage (p4 submit)
      00:00:43.773 Entering stage p4 submit
      00:00:43.773 Proceeding
      [Pipeline] p4publish
      00:00:43.794 
      ... p4 client -o jenkins-wnbuild7015-_test_2016_08_23_p4_stage-bin +
      00:00:43.797 
      ... p4 info +
      00:00:43.799 
      00:00:43.800 P4 Task: establishing connection.
      00:00:43.822 ... server:XXX:1666
      00:00:43.822 ... node: XXX
      00:00:43.823 
      ... p4 client -o jenkins-wnbuild7015-_test_2016_08_23_p4_stage-bin +
      00:00:43.825 
      ... p4 client -i +
      00:00:43.829 
      ... p4 client -o jenkins-wnbuild7015-_test_2016_08_23_p4_stage-bin +
      00:00:43.831 
      ... p4 client -i +
      00:00:43.834 ... client: jenkins-wnbuild7015-_test_2016_08_23_p4_stage-bin
      00:00:43.857 
      ... p4 client -o jenkins-wnbuild7015-_test_2016_08_23_p4_stage-bin
       +
      00:00:43.860 
      ... p4 info
       +
      00:00:43.864 
      00:00:43.864 P4 Task: establishing connection.
      00:00:43.864 ... server: XXX:1666
      00:00:43.865 ... node: XXX
      00:00:43.865 
      00:00:43.865 P4 Task: establishing connection.
      00:00:43.865 ... server: XXX:1666
      00:00:43.866 ... node: XXX
      00:00:43.866 P4 Task: reconcile files to changelist.
      00:00:43.866 
      ... p4 revert -k //jenkins-wnbuild7015-_test_2016_08_23_p4_stage-bin/...
       +
      00:00:43.869 
      ... p4 sync -k //jenkins-wnbuild7015-_test_2016_08_23_p4_stage-bin/...
       +
      00:00:43.961 
      ... p4 reconcile -e -a -f //jenkins-wnbuild7015-_test_2016_08_23_p4_stage-bin/...
       +
      00:01:07.330 
      ... p4 opened -Cjenkins-wnbuild7015-_test_2016_08_23_p4_stage-bin //jenkins-wnbui___
       +
      00:01:07.331 duration: 0m 23s
      00:01:07.331 
      [Pipeline] stage (c)
      00:01:07.337 Entering stage c
      00:01:07.337 Proceeding
      [Pipeline] sleep
      00:01:07.342 Sleeping for 10 sec
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] }
      [Pipeline] // timestamps
      [Pipeline] End of Pipeline
      Finished: SUCCESS
      

            Unassigned Unassigned
            t_rex Oleksii Trekhov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: