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

Issues with P4 counters not working correctly in matrix builds

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.424
      Perforce plugin 1.3.0
    • Similar Issues:

      Description

      Hi,

      I'm having problems getting the Perforce plugin counter system to work properly. This is my setup:

      JobA (matrix project): 
      	P4 Counter = TOMLABEL
      	Update counter to most recent changeset = ticked
      	Build other projects = JobB
      
      	JobB (free-style project):
      	P4 Counter = TOMLABEL
      	Update counter to most recent changeset = not ticked
      

      So when I make a change in Perforce JobA is triggered. If I check the Console Output for the parent job it contains:

      Updating counter TOMLABEL to 140403
      [workspace] $ "C:\\Program Files\\Perforce\\p4.exe" counter TOMLABEL 140403
      

      Each element of JobA's matrix then builds. In the Console output for those builds I see a lot of this:

      [Win32] $ "C:\\Program Files\\Perforce\\p4.exe" -s sync -f //personal/tfields/Live/Engine/Tools/program.exe@140403
      

      which is what I expect to see, ie. it's syncing to my counter.

      In between JobA finishing and JobB starting I check in another file which means the latest changelist Perforce knows about is now 140404.

      So JobA finally finishes building, succeeds and triggers JobB.

      All JobB does is print out the current value of TOMLABEL. So if I check the Console Output I would expect to see the value 140403. Unfortunately I don't. I get the value 140404 back.

      [workspace] $ "C:\\Program Files\\Perforce\\p4.exe" workspace -o Jenkins_External
      18:24:53  Last build changeset: 140392
      18:24:53  [workspace] $ "C:\\Program Files\\Perforce\\p4.exe" counter TOMLABEL
      18:24:53  [workspace] $ "C:\\Program Files\\Perforce\\p4.exe" -s changes //Jenkins_External/...@140393,@140404
      18:24:53  [workspace] $ "C:\\Program Files\\Perforce\\p4.exe" describe -s 140404
      18:24:53  [workspace] $ "C:\\Program Files\\Perforce\\p4.exe" -G where //personal/tfields/Live/Engine/External/NvTriStrip/NvTriStrip.cpp
      18:24:53  [workspace] $ "C:\\Program Files\\Perforce\\p4.exe" describe -s 140403
      18:24:53  [workspace] $ "C:\\Program Files\\Perforce\\p4.exe" -G where //personal/tfields/Live/Engine/Core/Engine.cpp
      18:24:54  Buildfile: C:\JCI\jobs\External\workspace\build-jci.xml
      18:24:54  
      18:24:54  PrintInfo:
      18:24:54       [exec] TOMLABEL = 140404
      

      Any ideas why this is happening. It seems like a bug to me.

      Regards,
      Tom.

      – Posted from Bugbox for Android

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rpetti Rob Petti
                Reporter:
                tfields Thomas Fields
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: