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

buildWithParameters with POST request and empty parameters will run build indefinitely

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • core
    • Jenkins 2.222.3, running on Ubuntu 16.04.6 LTS

      Hi,

      I noticed odd behavior. When you trigger parameterized builds via url using POST request, but no variables are set in UI, Jenkins will run build indefinitely, eventually killing it.

      Here are steps to reproduce:

      1. Enable invoking builds via url (check option "Trigger builds remotely (e.g., from scripts)" on).
      2. Enable parameterized builds (check option "This project is parameterized" on).
      3. Click "Add Parameter", choose String, but do not enter any value. Save settings.
      4. Invoke that url with POST request and random parameter, like down below.
      5. UI (maybe even build) will continue to run for long time, even if normal build is couple of seconds.

      No plugin is used for this, just stock Jenkins.

      Command to reproduce step 4.:

      curl -X POST http://jenkins-url/buildWithParameters?THIS_PARAMETER_IS_NOT_SET_IN_UI=1

            Unassigned Unassigned
            sanel Sanel Zukan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: