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

get "You must use POST method to trigger builds" when adding link to jenkins job via Rich Text Publisher

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • None
    • Windows 2008 Server, Jenkins 1.592, rich-text-plublisher-plugin 1.3

      Hi.

      I use the rich-text-publisher from a Jenkins job, to create HTML text on the build results page. Putting plain text there works very nicely. But, then I update this builds results text to contain a link to another Jenkins job that has parameters, that the user may wish to call after the first job is done, passing parameters used during the first job to the second job as URL parameters. Rich text publisher creates the link okay.

      Here is the gist of it:

      Text that is in "Rich Text Message" box, in Post build Step:

      <a href="${ENV:JENKINS_URL}/job/_publish_promote_module_test/buildWithParameters?FullVersion=${ENV:FullVersion}&Component=${ENV:Component}&location=${ENV:LOCATION}">Promote this build ${ENV:FullVersion}.</a>

      Generated link that appears on Build Results page:
      https://jenkins_server.company.com:8442//job/_publish_promote_module_test/buildWithParameters?FullVersion=1.2.3.4&Component=sample_component&location=//builds/daily/sample_location

      When I click the link, I get new browser Window, with following message and a Proceed button:
      You must use POST method to trigger builds. (From scripts you may instead pass a per-project authentication token, or authenticate with your API token.) If you see this page, it may be because a plugin offered a GET link; file a bug report for that plugin.

      I can click the proceed button, but despite the parameters all appearing to be processed by the Jenkins job, the job is failing with what may be authentication errors, as hinted to by the above message.

            Unassigned Unassigned
            rickybobpat Rick Patterson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: