• Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • None

      Request the ability to force SCM polling on the master. It is presently delegated to slaves, and these require a workspace to poll, which implicitly causes a build to occur if the workspace does not exist. In environments where the slaves are short lived, this causes many extra builds.

      This is identical to JENKINS-9067 which was for the older predecessor perforce plugin

          [JENKINS-32814] Add "Only poll using master" option

          Paul Allen added a comment -

          I could override the environment variable for $NODE during the polling, this would use the correct Perforce Client Workspace, but may still execute on the slave.

          Not sure how to actually force Jenkins to poll on the master, seems to be out of the scope of the 'p4' plugin, as the decision where to poll has already been made. I'll read up on JENKINS-9067 and see how they fixed it.

          Paul Allen added a comment - I could override the environment variable for $NODE during the polling, this would use the correct Perforce Client Workspace, but may still execute on the slave. Not sure how to actually force Jenkins to poll on the master, seems to be out of the scope of the 'p4' plugin, as the decision where to poll has already been made. I'll read up on JENKINS-9067 and see how they fixed it.

          If i override $NODE to the correct slave and it was offline, will it bring that slave online then do the polling? Btw, the old perforce plugin will automatically use the master node if the slave node is offline. If it is possible to get the node online then do the polling that would be great.

          mohamed badran added a comment - If i override $NODE to the correct slave and it was offline, will it bring that slave online then do the polling? Btw, the old perforce plugin will automatically use the master node if the slave node is offline. If it is possible to get the node online then do the polling that would be great.

          Code changed in jenkins
          User: Paul Allen
          Path:
          src/main/java/org/jenkinsci/plugins/p4/PerforceScm.java
          src/main/java/org/jenkinsci/plugins/p4/client/ClientHelper.java
          src/main/java/org/jenkinsci/plugins/p4/filters/FilterPollMasterImpl.java
          src/main/java/org/jenkinsci/plugins/p4/tasks/PollTask.java
          src/main/resources/org/jenkinsci/plugins/p4/filters/FilterPollMasterImpl/config.jelly
          http://jenkins-ci.org/commit/p4-plugin/2b7be12c5aae5bdfbf1a004ce3c811b4c49a7939
          Log:
          Poll on Master (without workspace)

          New Polling Filter ‘Poll on Master using Last Build’. Only polls on
          the master and fetches it change from the last Build. Note that 0 is
          assumed if no previous build is found.

          JENKINS-32814

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Paul Allen Path: src/main/java/org/jenkinsci/plugins/p4/PerforceScm.java src/main/java/org/jenkinsci/plugins/p4/client/ClientHelper.java src/main/java/org/jenkinsci/plugins/p4/filters/FilterPollMasterImpl.java src/main/java/org/jenkinsci/plugins/p4/tasks/PollTask.java src/main/resources/org/jenkinsci/plugins/p4/filters/FilterPollMasterImpl/config.jelly http://jenkins-ci.org/commit/p4-plugin/2b7be12c5aae5bdfbf1a004ce3c811b4c49a7939 Log: Poll on Master (without workspace) New Polling Filter ‘Poll on Master using Last Build’. Only polls on the master and fetches it change from the last Build. Note that 0 is assumed if no previous build is found. JENKINS-32814

          Paul Allen added a comment -

          Released.

          Paul Allen added a comment - Released.

            p4paul Paul Allen
            poje Jim Poje
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: