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

Does not properly create a parameter if we use a Scripted Pipeline and Scriptler script

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • active-choices-plugin
    • None
    • Jenkins 2.319.3
      uno-choice:2.6.0
      scriptler:3.4
    • 2.6.1

      When we are running this pipeline

      // code placeholder
      properties([
        parameters([
          [
            $class: 'ChoiceParameter',
            choiceType: 'PT_SINGLE_SELECT',
            name: 'Environment',
            script: [
              $class: 'ScriptlerScript',
              isSandboxed: false,
              scriptlerScriptId:'Environments.groovy'
            ]
          ],
         ])
      ])pipeline {
        agent any
        stages {
          stage('Build') {
            steps {
              echo "${params.Environment}"
            }
          }
        }
      }
      

      We do not get properly configured Active choice parameter, parameter Scriptler script is not defined. It is set to Default.

      If we do Active choice parameter configuration by hand, we can choice Environments.groovy script.

          [JENKINS-67934] Does not properly create a parameter if we use a Scripted Pipeline and Scriptler script

          I've encountered this on Jenkins 2.289.3 with Active Choices 2.6.0 and Scriptler 3.4 as well. This is caused by the changes in PR #50. I'm going to see if I can figure out a way to fix it and create a PR. Currently, there does not appear to be a way to adapt a pipeline in any way to use a Scriptler script parameter.

          Michael Tughan added a comment - I've encountered this on Jenkins 2.289.3 with Active Choices 2.6.0 and Scriptler 3.4 as well. This is caused by the changes in PR #50 . I'm going to see if I can figure out a way to fix it and create a PR. Currently, there does not appear to be a way to adapt a pipeline in any way to use a Scriptler script parameter.

          This should be resolved with #59, which is planned to be released as 2.6.1. I don't have visibility into when this will be released however.

          Michael Tughan added a comment - This should be resolved with #59 , which is planned to be released as 2.6.1. I don't have visibility into when this will be released however.

          2.6.1 was released earlier today and should resolve this.

          Michael Tughan added a comment - 2.6.1 was released earlier today and should resolve this.

            kinow Bruno P. Kinoshita
            andrew_v Andrew Verkhoglyad
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: