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

Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • None
    • Ubuntu 14.04 x86_64
      OpenJDK 7u101-2.6.6
      Jenkins 2.11
      Active Choices Plug-in 1.4
      Mask Passwords Plugin 2.8

      Under "Manage Jenkins / Configure System",
      I configured "Mask Passwords - Parameters to automatically mask" for:
      Active Choices Reactive Reference Parameter
      Active Choices Reactive Parameter
      Active Choices Parameter

      and created one "Mask Passwords - Global name/password pairs" for:
      build_password

      In Jenkins job configuration,
      I have an "Active Choices Reactive Parameter" using Groovy script
      and tries to use that global variable ${build_password}:

      if ( SVN_FOLDER.endsWith("/trunk") ){
          return ["N/A"]
      } else {
          def SVN_LIST_URL = "${SVN_ROOT}/${SVN_FOLDER}"
          def SVN_CMD_ARG = "svn ls --username build --password ${build_password} --non-interactive ${SVN_LIST_URL}"
          def SVN_CMD_OUT = SVN_CMD_ARG.execute().text
          def SVN_SELECCTION_LIST = SVN_CMD_OUT.split('/\n').toList().sort().reverse()
      
          return SVN_SELECCTION_LIST
      }
      

      The above code works only if I replace ${build_password} with actual password string.

            kinow Bruno P. Kinoshita
            totoroliu Rick Liu
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: