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

Perforce:Publish assets override new changes

    Details

    • Similar Issues:

      Description

      My Job is triggered on any files changes
      Perforce Repository setup is identical for Retrieving and Publish Assets
      The issue is along the following scenario:

      1) file.txt content changed from 123 to 345
      2) file.txt is submitted to the repository
      3) Jenkins job is triggered due to this change
      4) while jenkins jobs still running and before the "Perforce:Publish assets step" file.txt content changed again from 345 to 678 and submitted to the repository
      5) Perforce:Publish assets step override the most updated version of the file to the previous one.
      meaning file.txt is submitted back to the repository with content "345".

        Attachments

          Activity

          Hide
          p4paul Paul Allen added a comment -

          With the Publish step I recommend using a different workspace for Publish from your Populate workspace. I normally add a '-publish' prefix to the workspace name e.g.

          ${P4_CLIENT}-publish

          Assuming that the file.txt is not read during the build, but only written/generated. I would suggest that your Populate workspace View excludes the file (use a '-//file.txt' mapping if necessary). Then only map the files to be submitted in your Publish workspace.

          The Populate workspace view is used to determine if a change has occurred and therefore must not include 'file.txt'.

          Show
          p4paul Paul Allen added a comment - With the Publish step I recommend using a different workspace for Publish from your Populate workspace. I normally add a '-publish' prefix to the workspace name e.g. ${P4_CLIENT}-publish Assuming that the file.txt is not read during the build, but only written/generated. I would suggest that your Populate workspace View excludes the file (use a '-//file.txt' mapping if necessary). Then only map the files to be submitted in your Publish workspace. The Populate workspace view is used to determine if a change has occurred and therefore must not include 'file.txt'.
          Hide
          guyoha Guy Oh added a comment -

          Thanks Paul
          I did try to use different WorkSpace and eliminate the unnecessary Section (it is not one file only) however it seems that the process doesn't take the mapping into account as the relevant stream it is attached to has its own mapping which seems to override the configuration I put in
          It seems to me that i'll have to create a designated stream (possibly virtual stream) that will be connected to my Development stream and filter unnecessary path from there.

          Show
          guyoha Guy Oh added a comment - Thanks Paul I did try to use different WorkSpace and eliminate the unnecessary Section (it is not one file only) however it seems that the process doesn't take the mapping into account as the relevant stream it is attached to has its own mapping which seems to override the configuration I put in It seems to me that i'll have to create a designated stream (possibly virtual stream) that will be connected to my Development stream and filter unnecessary path from there.
          Hide
          p4paul Paul Allen added a comment -

          Must use virtual stream for Populate step; to filter view when submitting to a streams depot.

          Show
          p4paul Paul Allen added a comment - Must use virtual stream for Populate step; to filter view when submitting to a streams depot.
          Hide
          p4paul Paul Allen added a comment -

          Released in 1.3.9

          Show
          p4paul Paul Allen added a comment - Released in 1.3.9

            People

            • Assignee:
              p4paul Paul Allen
              Reporter:
              guyoha Guy Oh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: