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

Hudson /polling build trigger doesn't seem to support parameterized builds like /buildWithParameters does

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • mercurial-plugin
    • None
    • Windows Server 2008 R2 under Tomcat

      I have a Mercurial repository that is polled by Hudson using a post-commit hook in Mercurial.

      It looks like this:

      [hooks]
      changegroup.hudson = "C:\Program Files (x86)\UnxUtils\usr\local\wbin\wget" --non-verbose --spider http://source:8080/job/Messaging/polling | ECHO Result of Hudson Polling Request

      I have recently parameterized the build, so that a mercurial revision id may be passed along. If multiple incoming concurrent changesets, this better allows identification of where a test regression may have occurred, for instance. I have created a string called HgRevId, and I am passing that in as the 'branch' for the Mercurial plugin. This bit seems to work fine.

      I would therefore like the hook to become:

      [hooks]
      changegroup.hudson = "C:\Program Files (x86)\UnxUtils\usr\local\wbin\wget" --non-verbose --spider http://source:8080/job/Messaging/polling?HgRevId=%HG_NODE% | ECHO Result of Hudson Polling Request For Node %HG_NODE%

      However, it seems that there's no way to pass parameters to a polling request build trigger? I tried pollWithParameters and pollingWithParameters with no luck.

      I can use buildWithParameters, but then that doesn't allow me to exclude portions of my repository from causing builds (such as a docs dir):

      [hooks]
      changegroup.hudson = "C:\Program Files (x86)\UnxUtils\usr\local\wbin\wget" --non-verbose --spider http://source:8080/job/Messaging/buildWithParameters?HgRevId=%HG_NODE% | ECHO Result of Hudson Polling Request For Node %HG_NODE%

          [JENKINS-8335] Hudson /polling build trigger doesn't seem to support parameterized builds like /buildWithParameters does

          Iristyle created issue -
          Iristyle made changes -
          Description Original: I have a Mercurial repository that is polled by Hudson using a post-commit hook in Mercurial.

          It looks like this:

          [hooks]
          changegroup.hudson = "C:\Program Files (x86)\UnxUtils\usr\local\wbin\wget" --non-verbose --spider http://source:8080/job/Messaging/polling | ECHO Result of Hudson Polling Request


          I have recently parameterized the build, so that a mercurial revision id may be passed along. If multiple incoming concurrent changesets, this better allows identification of where a test regression may have occurred, for instance. I have created a string called HgRevId, and I am passing that in as the 'branch' for the Mercurial plugin. This bit seems to work fine.

          I would therefore like the hook to become:

          [hooks]
          # this uses wget to hit the hudson url responsible for starting a build
          changegroup.hudson = "C:\Program Files (x86)\UnxUtils\usr\local\wbin\wget" --non-verbose --spider http://source:8080/job/Messaging/polling?HgRevId=%HG_NODE% | ECHO Result of Hudson Polling Request For Node %HG_NODE%


          However, it seems that there's no way to pass parameters to a polling request build trigger? I tried pollWithParameters and pollingWithParameters with no luck.


          I can use buildWithParameters, but then that doesn't allow me to exclude portions of my repository from causing builds (such as a docs dir):

          [hooks]
          changegroup.hudson = "C:\Program Files (x86)\UnxUtils\usr\local\wbin\wget" --non-verbose --spider http://source:8080/job/Messaging/buildWithParameters?HgRevId=%HG_NODE% | ECHO Result of Hudson Polling Request For Node %HG_NODE%

          New: I have a Mercurial repository that is polled by Hudson using a post-commit hook in Mercurial.

          It looks like this:

          [hooks]
          changegroup.hudson = "C:\Program Files (x86)\UnxUtils\usr\local\wbin\wget" --non-verbose --spider http://source:8080/job/Messaging/polling | ECHO Result of Hudson Polling Request


          I have recently parameterized the build, so that a mercurial revision id may be passed along. If multiple incoming concurrent changesets, this better allows identification of where a test regression may have occurred, for instance. I have created a string called HgRevId, and I am passing that in as the 'branch' for the Mercurial plugin. This bit seems to work fine.

          I would therefore like the hook to become:

          [hooks]
          changegroup.hudson = "C:\Program Files (x86)\UnxUtils\usr\local\wbin\wget" --non-verbose --spider http://source:8080/job/Messaging/polling?HgRevId=%HG_NODE% | ECHO Result of Hudson Polling Request For Node %HG_NODE%


          However, it seems that there's no way to pass parameters to a polling request build trigger? I tried pollWithParameters and pollingWithParameters with no luck.


          I can use buildWithParameters, but then that doesn't allow me to exclude portions of my repository from causing builds (such as a docs dir):

          [hooks]
          changegroup.hudson = "C:\Program Files (x86)\UnxUtils\usr\local\wbin\wget" --non-verbose --spider http://source:8080/job/Messaging/buildWithParameters?HgRevId=%HG_NODE% | ECHO Result of Hudson Polling Request For Node %HG_NODE%

          cjo9900 made changes -
          Component/s Original: core [ 15593 ]
          Component/s Original: parameterized-trigger [ 15592 ]
          Assignee New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-16783 [ JENKINS-16783 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-9686 [ JENKINS-9686 ]
          Eric Sirianni made changes -
          Link New: This issue is related to JENKINS-14276 [ JENKINS-14276 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 138445 ] New: JNJira + In-Review [ 174902 ]

            jglick Jesse Glick
            iristyle Iristyle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: