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

Add possibility to toggle sandbox usage when using Scriptler scripts and Jenkins pipelines

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • active-choices-plugin
    • None

      When defining an Active Choice parameter that uses a Scriptler script inside a Jenkins pipeline, there is no option to toggle sandbox usage ("Use Groovy Sandbox" checkbox).

      i.e.:

       

      properties([
        parameters([
          [
            $class: 'CascadeChoiceParameter',
            choiceType: 'PT_SINGLE_SELECT',
            filterable: true,
            filterLength: 1,
            name: 'Test',
            script: [
              $class: 'ScriptlerScript',
              scriptlerScriptId:'test.groovy',
              sandbox: false,
            ],
          ],
        ])
      ])
      
      pipeline {
        agent any
        stages {
          stage('Test') {
            steps {
              echo "Test: ${params.Test}"
            }
          }
        }
      } 

       

       

      Whenever I run it, the console log shows:

      WARNING: Unknown parameter(s) found for class type 'org.biouno.unochoice.model.ScriptlerScript': sandbox 

      If I use the UI, however, the checkbox is available for toggling sandbox:

            kinow Bruno P. Kinoshita
            marcelo_melo Marcelo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: