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

Extended Choice Parameter Plug in in Jenkins 2.0 always show that there are scripts to approve

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins ver. 2.0
      Extended Choice Parameter Plug-In 0.64

      It seeems that the Extended Choice Parameter Plug-In [tried version 0.64] and Jenkins ver. 2.0 don't work together.

      When I create a simple groovy script for the plugin and I try to launch the build it appears the message:

      "You have unapproved groovy scripts that need approval before they can be executed. Go to In-Process Script Approval page to approve your scripts."

      However in the approval page there are no scripts to be approved. See attached screenshot for the reference script I used.

      If the script is modified in the build configuration page, it is appearing correctly as a script to be approved. However approving it, will still display the message

      "You have unapproved groovy scripts that need approval before they can be executed. Go to In-Process Script Approval page to approve your scripts."

      This happened after the upgrade to Jenkins 2.0 from Jenkins ver. 1.656

        1. Selection_011.png
          Selection_011.png
          35 kB
        2. Selection_012.png
          Selection_012.png
          33 kB
        3. Selection_013.png
          Selection_013.png
          19 kB
        4. test_job.xml
          2 kB
        5. config-example.png
          config-example.png
          37 kB
        6. test_job_2.xml
          3 kB

          [JENKINS-34524] Extended Choice Parameter Plug in in Jenkins 2.0 always show that there are scripts to approve

          vimil added a comment -

          In the example you sent, you have to use the 'default groovy script' option to enter the groovyscript instead of 'groovyscript' See attached example.

          vimil added a comment - In the example you sent, you have to use the 'default groovy script' option to enter the groovyscript instead of 'groovyscript' See attached example.

          Davide Z. added a comment -

          I tried again to use both defaul and groovyscript value. See test_job_2.xml attached.

          no changes appeared. When I launch the buld the first time I got a message that is suggesting to approve the scripts. After I approve them, and go back to the build page, the approval script message is still there. Pressing on approve script button lead to a page where there are no more scripts to be approved.

          Davide Z. added a comment - I tried again to use both defaul and groovyscript value. See test_job_2.xml attached. no changes appeared. When I launch the buld the first time I got a message that is suggesting to approve the scripts. After I approve them, and go back to the build page, the approval script message is still there. Pressing on approve script button lead to a page where there are no more scripts to be approved.

          vimil added a comment -

          Could you check one more thing for me? How is your jenkins security configured? are you running the job as an admin, another user or anonymous? Is security enabled in Jenkins? If possible could you send a screenshot of Jenkins security config page?

          vimil added a comment - Could you check one more thing for me? How is your jenkins security configured? are you running the job as an admin, another user or anonymous? Is security enabled in Jenkins? If possible could you send a screenshot of Jenkins security config page?

          vimil added a comment -

          Can you also check if you have any pending classpath approvals? Could you send me a screenshot of the build page of the test job you created

          vimil added a comment - Can you also check if you have any pending classpath approvals? Could you send me a screenshot of the build page of the test job you created

          vimil added a comment -

          Are you running jenkins on tomcat or standalone?

          vimil added a comment - Are you running jenkins on tomcat or standalone?

          vimil added a comment -

          I think I found the issue, the script-security plugin 1.19 is not compatible with the extended-choice-parameter plugin. You could try with 1.18 version of script-security plugin. in the meantime I'll work on a fix for this.

          vimil added a comment - I think I found the issue, the script-security plugin 1.19 is not compatible with the extended-choice-parameter plugin. You could try with 1.18 version of script-security plugin. in the meantime I'll work on a fix for this.

          vimil added a comment -

          fixed in version 0.70

          vimil added a comment - fixed in version 0.70

          Same for me.
          Windows version 1.651.1, down graded to the 1.18 version and rebooted and remove the XML.
          Re-approved.

          Still has the message.

          michael pechner added a comment - Same for me. Windows version 1.651.1, down graded to the 1.18 version and rebooted and remove the XML. Re-approved. Still has the message.

          down graded to 1.17 - all good.

          michael pechner added a comment - down graded to 1.17 - all good.

          vimil added a comment -

          Try 0.70 of extended choice parameter plugin. It has the fix for this issue

          vimil added a comment - Try 0.70 of extended choice parameter plugin. It has the fix for this issue

            vimil vimil
            dawez Davide Z.
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: