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

choices variable in choice parameter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • pipeline
    • None
    • Jenkins 2.190.3

      Why list of choice update only when I push something in the git repo?
      How update parameter each time when I refresh page in a browser in declarative pipeline?

      @Library('something')
      import com.something.MySomething
      
      def list = MySomething.getList()
      
      pipeline {
          agent any
          parameters {
              choice(name: 'CHOICE', choices: list, description: 'Pick something')
          }
          stages {
              stage('Example') {
                  steps {
                      echo "Choice: ${params.CHOICE}"
                  }
              }
          }
      }
      

            Unassigned Unassigned
            burtsevyg Yuriy Burtsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: