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

Gerrit Trigger - 405 Method not allowed when a build is launched manually

    Details

    • Similar Issues:

      Description

      Hello,

      When I use the "trick" to add a string parameter called "GERRIT_REFSPEC" with "refs/heads/master" as default value (described here: https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger), I can't click on the "Launch a build" button.

      I get this error: "Method not allowed: The requested method GET is not allowed for the URL /job/HelloWorld/build". This does not happen if the parameter is not set (even if the build fails, which is only logical).

      Thank you for your help

        Attachments

          Issue Links

            Activity

            theo_c Théo Chamley created issue -
            Hide
            gbougeard Greg BOUGEARD added a comment -

            Hi,

            I configured the same way but I have a different fail message :

            20/09/2012 11:08:48 Started by user gbougeard
            20/09/2012 11:08:48 [EnvInject] - Loading node environment variables.
            20/09/2012 11:08:48 Building on master in workspace /var/lib/jenkins/jobs/CI-components-ALL_BRANCHES/workspace
            20/09/2012 11:08:48 Checkout:workspace / /var/lib/jenkins/jobs/CI-components-ALL_BRANCHES/workspace - hudson.remoting.LocalChannel@2bacfa90
            20/09/2012 11:08:48 Using strategy: Default
            20/09/2012 11:08:48 Last Built Revision: Revision 535685321e0a8183296fedb7a9feded6a5b4b206 (origin/release)
            20/09/2012 11:08:48 Fetching changes from 1 remote Git repository
            20/09/2012 11:08:48 Fetching upstream changes from ssh://gerrit.it.int/components
            20/09/2012 11:08:49 No candidate revisions
            20/09/2012 11:08:49 ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

            Show
            gbougeard Greg BOUGEARD added a comment - Hi, I configured the same way but I have a different fail message : 20/09/2012 11:08:48 Started by user gbougeard 20/09/2012 11:08:48 [EnvInject] - Loading node environment variables. 20/09/2012 11:08:48 Building on master in workspace /var/lib/jenkins/jobs/CI-components-ALL_BRANCHES/workspace 20/09/2012 11:08:48 Checkout:workspace / /var/lib/jenkins/jobs/CI-components-ALL_BRANCHES/workspace - hudson.remoting.LocalChannel@2bacfa90 20/09/2012 11:08:48 Using strategy: Default 20/09/2012 11:08:48 Last Built Revision: Revision 535685321e0a8183296fedb7a9feded6a5b4b206 (origin/release) 20/09/2012 11:08:48 Fetching changes from 1 remote Git repository 20/09/2012 11:08:48 Fetching upstream changes from ssh://gerrit.it.int/components 20/09/2012 11:08:49 No candidate revisions 20/09/2012 11:08:49 ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
            Hide
            gbougeard Greg BOUGEARD added a comment -

            I found that when the Refs Updated trigger is used, there is no $GERRIT_BRANCH parameter but only a $GERRIT_REFNAME.
            As my Refs Updated triggered builds were failing too, adding a GERRIT_BRANCH parameter with default value $GERRIT_REFNAME fixed them.

            And to build a specific branch like origin/master, there is just to set the GERRIT_BRANCH to master and the GERRIT_REFSPEC to rfs/heads/master .

            Show
            gbougeard Greg BOUGEARD added a comment - I found that when the Refs Updated trigger is used, there is no $GERRIT_BRANCH parameter but only a $GERRIT_REFNAME. As my Refs Updated triggered builds were failing too, adding a GERRIT_BRANCH parameter with default value $GERRIT_REFNAME fixed them. And to build a specific branch like origin/master, there is just to set the GERRIT_BRANCH to master and the GERRIT_REFSPEC to rfs/heads/master .
            Hide
            theo_c Théo Chamley added a comment -

            It seems logical to also set GERRIT_BRANCH to a default value, but I still encounter the same error...

            Show
            theo_c Théo Chamley added a comment - It seems logical to also set GERRIT_BRANCH to a default value, but I still encounter the same error...
            theo_c Théo Chamley made changes -
            Field Original Value New Value
            Assignee jyrkiput [ jyrkiput ] rsandell [ rsandell ]
            Hide
            jkoleszar John Koleszar added a comment -

            Are you running behind a reverse proxy? I suspect that JENKINS-3121 is the underlying issue here.

            Show
            jkoleszar John Koleszar added a comment - Are you running behind a reverse proxy? I suspect that JENKINS-3121 is the underlying issue here.
            jkoleszar John Koleszar made changes -
            Link This issue duplicates JENKINS-3121 [ JENKINS-3121 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 145966 ] JNJira + In-Review [ 176495 ]
            markewaite Mark Waite made changes -
            Assignee rsandell [ rsandell ]

              People

              • Assignee:
                Unassigned
                Reporter:
                theo_c Théo Chamley
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: