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

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not A Defect
    • None
    • Windows 2008 Server, Jenkins 1.592, rich-text-plublisher-plugin 1.3

    Description

      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.

      Attachments

        Activity

          I guess I will close this item. I am thinking I need a POST method, I didn't know enough about URL's to know that they apparently do GET methods, and can't do POSTs. What I am trying to do is create a link on one Jenkins job's build results page to second Jenkins job that will pass parameters about the build, and invoke the second Jenkins job. I need a link, since the first job does not always require the second job, the need for the second job might be determined days or even weeks later.

          rickybobpat Rick Patterson added a comment - I guess I will close this item. I am thinking I need a POST method, I didn't know enough about URL's to know that they apparently do GET methods, and can't do POSTs. What I am trying to do is create a link on one Jenkins job's build results page to second Jenkins job that will pass parameters about the build, and invoke the second Jenkins job. I need a link, since the first job does not always require the second job, the need for the second job might be determined days or even weeks later.
          danielbeck Daniel Beck added a comment -

          What exactly is the bug here?

          Note that

          If you see this page, it may be because a plugin offered a GET link; file a bug report for that plugin.

          does not apply, as you wrote the link yourself.

          danielbeck Daniel Beck added a comment - What exactly is the bug here? Note that If you see this page, it may be because a plugin offered a GET link; file a bug report for that plugin. does not apply, as you wrote the link yourself.

          People

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

            Dates

              Created:
              Updated:
              Resolved: