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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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:

            Assignee:
            Bruno P. Kinoshita
            Reporter:
            Marcelo
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: