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

How to poll two different folder under a single branch in single job

    • Icon: New Feature New Feature
    • Resolution: Postponed
    • Icon: Critical Critical
    • p4-plugin
    • OS :- Red Hat Enterprise Linux Server release 6.5 (Santiago)
      JDK :- 1.7.0_10
      Jenkins Version :- Jenkins ver. 1.565
      Container :- weblogic
      Web Browser :- Chrome and IE

      We are trying to sync the codes from two different folder of same branch in two different workspaces. But only the last one which is defined in view map is synced. And the other one is not polled by the automatic build.

      To give a better understanding of the issue, we have the following two lines in view map of our job :-

      //OSSLEV3/Dev_R4/Cramer/... //LEVEL3_ARMMNGP_P1_THIN_FLOW_R4/...
      //OSSLEV3/Dev_R4/MNGP/... //L3-MNGP-build_R4/...

      Ideally, it should poll and read the changes from both the folders, but that is not the case. It is only reading from the last folder.

          [JENKINS-36426] How to poll two different folder under a single branch in single job

          Jason Davis added a comment - - edited

          You could just create a workspace that has the folders you want and either manage that in P4V or in Jenkins. Personally, I'd rather have a different workspace tuned for what I want rather than sharing it, just so I know the purpose of the workspace. For me, I like to keep the workspaces in Jenkins, so I set the Perforce config in the Job to "Manual", then set the name to ${JOB_NAME}, then I'd set the view mappings to:

          //OSSLEV3/Dev_R4/Cramer/... //${JOB_NAME}/...
          //OSSLEV3/Dev_R4/MNGP/... //${JOB_NAME}/...

          Jenkins will automatically create a workspace for you with the name of your Jenkins job.

          btw - Perforce by default doesn't like mapping two different depot paths to the same place, leading to a similar problem you've described. To get around that you'll probably need to use overlay mappings.

          https://www.perforce.com/perforce/doc.current/manuals/p4guide/chapter.configuration.html#configuration.refine_workspace.map_diff_depot_locations

          Leading to something like this:

          //OSSLEV3/Dev_R4/Cramer/... //${JOB_NAME}/...
          +//OSSLEV3/Dev_R4/MNGP/... //${JOB_NAME}/...

          Jason Davis added a comment - - edited You could just create a workspace that has the folders you want and either manage that in P4V or in Jenkins. Personally, I'd rather have a different workspace tuned for what I want rather than sharing it, just so I know the purpose of the workspace. For me, I like to keep the workspaces in Jenkins, so I set the Perforce config in the Job to "Manual", then set the name to ${JOB_NAME}, then I'd set the view mappings to: //OSSLEV3/Dev_R4/Cramer/... //${JOB_NAME}/... //OSSLEV3/Dev_R4/MNGP/... //${JOB_NAME}/... Jenkins will automatically create a workspace for you with the name of your Jenkins job. btw - Perforce by default doesn't like mapping two different depot paths to the same place, leading to a similar problem you've described. To get around that you'll probably need to use overlay mappings. https://www.perforce.com/perforce/doc.current/manuals/p4guide/chapter.configuration.html#configuration.refine_workspace.map_diff_depot_locations Leading to something like this: //OSSLEV3/Dev_R4/Cramer/... //${JOB_NAME}/... +//OSSLEV3/Dev_R4/MNGP/... //${JOB_NAME}/...

          Karl Wirth added a comment -

          Closing due to inactivity. If this is still a problem and if you have a current Perforce support contract please email support@perforce.com so I can investigate further.

          Karl Wirth added a comment - Closing due to inactivity. If this is still a problem and if you have a current Perforce support contract please email support@perforce.com so I can investigate further.

            Unassigned Unassigned
            shubham9291 Shubham Jain
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: