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

Acceptance test harness needs to adapt to latest Scriptler plugin release

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • scriptler-plugin
    • None
    • Jenkins 2.479.2
      scriptler 392.va_dce718b_3e40/scriptler.hpi
      Other plugins as listed in plugins.txt

      The ScriptlerPluginTest.parameterized() test in the acceptance test harness is failing with Scriptler plugin 392.va_dce718b_3e40 and Jenkins 2.488.

      I confirmed with interactive steps that Scriptler plugin 376.v152edd95b_ca_f is able to create a parameterized script with Jenkins 2.479.2 and run the script.

      Steps that I took to show the 376.v152edd95b_ca_f release works as expected:

      1. Create the plugins.txt file with a set of current plugins and scriptler plugin 376.v152edd95b_ca_f
      2. Create the run-jenkins.sh shell script that downloads the plugins from plugins.txt and runs Jenkins 2.479.2
      3. Run the run-jenkins.sh shell script and complete the setup wizard by creating a new user and downloading no additional plugins
      4. Open scriptler, create, and save a new script with id 'parameterized-script', name 'script-with-parameter', and script "println lhs + ' + ' + rhs;"
      5. Edit the newly created script and define 2 script parameters, "lhs" and "rhs" with values "11" and "7 respectively and save the script
      6. Approve the newly created script from the "Manage Jenkins" -> "In-process Script Approval"
      7. Run the newly created script, accept the default parameter values, and confirm that the output is as expected, "11 + 7"

      Steps that I took to with the 392.va_dce718b_3e40 release:

      1. Create the bad-plugins.txt file with a set of current plugins and scriptler plugin 392.va_dce718b_3e40
      2. Create the bad-run-jenkins.sh shell script that downloads the plugins from bad-plugins.txt and runs Jenkins 2.488
      3. Run the bad-run-jenkins.sh shell script and complete the setup wizard by creating a new user and downloading no additional plugins
      4. Open scriptler, create, and save a new script with id 'parameterized-script', name 'parameterized-script-name', and script "println lhs + ' + ' + rhs;"
      5. Approve the newly created script from the "Manage Jenkins" -> "In-process Script Approval"
      6. Run the newly created script and attempt to define two parameters, see that the second parameter is not allowed

      The crucial difference seems to be that on the very first scriptler script, the problem appears if I create the script, save it, approve it, and run the script without performing a second edit step.

      The problem does not appear if I create the script, save it, edit the script to add parameters, save it, then run the script. The additional step to edit the script to add parameters seems to avoid the problem. I believe that is the closest approximation I have for the failure in ScriptlerPluginTest.parameterized() test in the acceptance test harness

      When attempting to run the parameterized job without the second edit step, the UI looks like this:

        1. bad-plugins.txt
          2 kB
          Mark Waite
        2. bad-run-jenkins.sh
          0.9 kB
          Mark Waite
        3. plugins.txt
          2 kB
          Mark Waite
        4. run-jenkins.sh
          0.9 kB
          Mark Waite
        5. scriptler-parameterized-job-fails.png
          208 kB
          Mark Waite

            mtughan Michael Tughan
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: