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

Add option "Use Upstream Project revision" similar to that on the legacy perforce plugin

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • p4-plugin

      Please could you consider adding a "Use Upstream Project revision" checkbox to the p4-plugin similar to that available in the legacy "perforce-plugin".

      It is a useful feature when jobs are setup to run after an upstream job with artifacts being copied. In many circumstances like this it is important that the downstream job uses the same file revisions as the upstream job that created the artifacts.

      I think it may be already possible to do this with "Parameterized Trigger Plugin" in the upstream job setting "change" parameter on the downstream job, but then all the downstream jobs have to be listed in the upstream job which is more complex to configure.

          [JENKINS-33163] Add option "Use Upstream Project revision" similar to that on the legacy perforce plugin

          Philip Aston added a comment - - edited

          I've only noticed it since upgrading 1.9.6 -> 1.10.10 recently. But yes, I could have missed it before. I'll pay close attention over the next few days and let you know.

          Which workaround are you referring to? The one you mentioned in comment-273024 was documented under this issue and is what I'm using.

           

          Philip Aston added a comment - - edited I've only noticed it since upgrading 1.9.6 -> 1.10.10 recently. But yes, I could have missed it before. I'll pay close attention over the next few days and let you know. Which workaround are you referring to? The one you mentioned in comment-273024 was documented under this issue and is what I'm using.  

          Karl Wirth added a comment -

          Hi philipa - Yes that's the one. I'll do some basic tests here to see if I can repro this.

          Karl Wirth added a comment - Hi philipa - Yes that's the one. I'll do some basic tests here to see if I can repro this.

          Karl Wirth added a comment -

          Hi philipa - I just tried the following test with 1.10.10 and it seemed to work:

          (1) Add CL 123 to downstream job directory.

          (2) Add CL 124 to upstream job directory.

          (3) Trigger upstream job that has a 20 second sleep as a build step.

          (4) Add 2 more CLs to each directory.

          (5) Downstream job is triggered with CL124 as the paramater and jobs is pinned to that CL. P4-Plugin looks for most recent CL in downstream depot path and syncs CL 123.

           

          My setup is - Upstream job...

           

          Downstream job...

          and:

          Karl Wirth added a comment - Hi philipa - I just tried the following test with 1.10.10 and it seemed to work: (1) Add CL 123 to downstream job directory. (2) Add CL 124 to upstream job directory. (3) Trigger upstream job that has a 20 second sleep as a build step. (4) Add 2 more CLs to each directory. (5) Downstream job is triggered with CL124 as the paramater and jobs is pinned to that CL. P4-Plugin looks for most recent CL in downstream depot path and syncs CL 123.   My setup is - Upstream job...   Downstream job... and:

          Philip Aston added a comment -

          Thanks for investigating Karl. Yes, that configuration corresponds to mine. I guess the one difference might be that my jobs run on nodes on different machines, with different workspaces. Also, the later commit will trigger another run of the upstream job (on a different machine).

          Its not recurred since I've downgraded, so I'm going to run with this for 1.9.6 for next week, then I'll try upgrading again.

          Philip Aston added a comment - Thanks for investigating Karl. Yes, that configuration corresponds to mine. I guess the one difference might be that my jobs run on nodes on different machines, with different workspaces. Also, the later commit will trigger another run of the upstream job (on a different machine). Its not recurred since I've downgraded, so I'm going to run with this for 1.9.6 for next week, then I'll try upgrading again.

          Karl Wirth added a comment -

          Hi philipa - Thanks and happy I can help.

          Karl Wirth added a comment - Hi philipa - Thanks and happy I can help.

          Philip Aston added a comment -

          I ran for a week 1.9.6 with no issues.

          I switched back to 1.10.10, and saw the problem again. It's a production config, so I've reverted back to 1.9.6.

          Philip Aston added a comment - I ran for a week 1.9.6 with no issues. I switched back to 1.10.10, and saw the problem again. It's a production config, so I've reverted back to 1.9.6.

          Karl Wirth added a comment -

          Hi philipa - Thanks. I'll test on WIndows and Linux build slaves and get back to you.

          Karl Wirth added a comment - Hi philipa - Thanks. I'll test on WIndows and Linux build slaves and get back to you.

          Karl Wirth added a comment -

          Hi philipa

          Finally got a chance to test this properly and still no luck in reproducing it. Can you please send an email to 'support@perforce.com' for my attention and send the full console logs for the two jobs when th. I'll try and figure out what I'm missing.

          Thanks in advance,

          Karl

          Karl Wirth added a comment - Hi philipa Finally got a chance to test this properly and still no luck in reproducing it. Can you please send an email to 'support@perforce.com' for my attention and send the full console logs for the two jobs when th. I'll try and figure out what I'm missing. Thanks in advance, Karl

          Philip Aston added a comment -

          Thanks p4karl. I've upgraded the plugin again; I'll send you the logs when I see the next failure.

          Philip Aston added a comment - Thanks p4karl . I've upgraded the plugin again; I'll send you the logs when I see the next failure.

          Karl Wirth added a comment -

          Hi philipa - Thanks.

          Karl Wirth added a comment - Hi philipa - Thanks.

            p4paul Paul Allen
            barnish Andrew Barnish
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: