• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • p4-plugin
    • None

      Currently the perforce plugin does not explicitly support matrix builds, which can lead to certain features not working correctly.

      For example, matrix builds will always use the same client workspace for all sub jobs, requiring a force sync for each one. In addition, each sub job will sync to the latest changeset, which could be different depending on when the jobs run. At the very least, the perforce plugin should sync to the same changeset for all sub jobs.

          [JENKINS-10606] Support Matrix Builds

          Andy Bigos added a comment -

          Hi,

          Given the title of this issue - can I ask what is the general state of Matrix Job support at the moment? I ask as I have some jobs which have some matrix elements that don't sync. It's pretty random which elements don't get a synced. I have selected:

          • Let Jenkins Manage Workspace View - TRUE
          • Let Jenkins Create Workspace - TRUE
          • Clean Workspace Before Each Build - TRUE
          • Always Force Sync - TRUE
          • Poll Only on Master - TRUE

          Does this behaviour sounds like something you might expect given the current level of support for matrix builds, or should I create a new issue and add more details? Or am I simply missing something in the config?

          Thanks for help,
          Andy

          Andy Bigos added a comment - Hi, Given the title of this issue - can I ask what is the general state of Matrix Job support at the moment? I ask as I have some jobs which have some matrix elements that don't sync. It's pretty random which elements don't get a synced. I have selected: Let Jenkins Manage Workspace View - TRUE Let Jenkins Create Workspace - TRUE Clean Workspace Before Each Build - TRUE Always Force Sync - TRUE Poll Only on Master - TRUE Does this behaviour sounds like something you might expect given the current level of support for matrix builds, or should I create a new issue and add more details? Or am I simply missing something in the config? Thanks for help, Andy

          Rob Petti added a comment -

          Your matrixruns might be running at the exact same time with the same client, so some of them don't sync.

          Try adding the ${JOB_NAME} token to your client workspace name. That should prevent any collisions, since it's unique for all matrixruns.

          Rob Petti added a comment - Your matrixruns might be running at the exact same time with the same client, so some of them don't sync. Try adding the ${JOB_NAME} token to your client workspace name. That should prevent any collisions, since it's unique for all matrixruns.

          Andy Bigos added a comment -

          Yes - that was it. Thanks!

          I'd set all the other items that had an 'Import Note' about matrix builds - but the workspace name didn't have one (though it has plenty of others!). At the risk of adding even more text I'd suggest adding something about this - or even better, when a matrix job is detected auto-populate the field with ${JOB_NAME}. That will at least bring the issue to notice.

          Anyway - thanks for sorting the issue out so quickly.

          Andy

          Andy Bigos added a comment - Yes - that was it. Thanks! I'd set all the other items that had an 'Import Note' about matrix builds - but the workspace name didn't have one (though it has plenty of others!). At the risk of adding even more text I'd suggest adding something about this - or even better, when a matrix job is detected auto-populate the field with ${JOB_NAME}. That will at least bring the issue to notice. Anyway - thanks for sorting the issue out so quickly. Andy

          Rob Petti added a comment -

          Yeah, I've been thinking about how best to handle it going forward. Having to add ${JOB_NAME} seems a bit hacky, but it works until this ticket gets resolved.

          Rob Petti added a comment - Yeah, I've been thinking about how best to handle it going forward. Having to add ${JOB_NAME} seems a bit hacky, but it works until this ticket gets resolved.

            Unassigned Unassigned
            rpetti Rob Petti
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: