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

ListSubversionTagsParameterDefinition params-Variable is null

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • subversion-plugin
    • 64-bit Oracle JVM 1.8.0_221
      Jenkins 2.181
      Subversion plugin 2.12.1
      Pipeline plugin 2.6
      Pipeline: Groovy plugin 2.70

      In my scripted pipeline i use:

      ...
      parameters([[$class: 'ListSubversionTagsParameterDefinition', defaultValue: 'trunk', maxTags: '', name: 'SVN_BRANCH', reverseByDate: true, reverseByName: false, tagsDir: '_http://svnRepo_', tagsFilter: 'trunk|tags/.*|branches/.*'],
      string(defaultValue: 'HEAD', description: '', name: 'REVISION', trim: false)])

      println "Params: ${params}"
      ...

      Everytime the output is:
      [Pipeline] echoParams: [REVISION=HEAD, SVN_BRANCH=null]
      although the defaultValue=trunk.

          [JENKINS-59658] ListSubversionTagsParameterDefinition params-Variable is null

          Bodo . added a comment - - edited

          I can confirm that params.<name> is always null, but an environment variable <name> is set to the expected value.

          In my Jenkinsfile I can use variable <name> instead of params.<name>.

          Jenkins 2.346.1

          Subversion plugin 2.16.0

          Bodo . added a comment - - edited I can confirm that params. <name> is always null , but an environment variable <name> is set to the expected value. In my Jenkinsfile I can use variable <name> instead of params. <name> . Jenkins 2.346.1 Subversion plugin 2.16.0

          Robin Fauvel added a comment -

          I can also repeat the issue described here.
          The parameter value should be accessible from the params object rather than (or in addition to) the env object.
          This convention is followed by the other parameters and is described here: https://www.jenkins.io/doc/book/pipeline/syntax/#parameters

          The values for these user-specified parameters are made available to Pipeline steps via the params object

          Robin Fauvel added a comment - I can also repeat the issue described here. The parameter value should be accessible from the params object rather than (or in addition to) the env object. This convention is followed by the other parameters and is described here: https://www.jenkins.io/doc/book/pipeline/syntax/#parameters The values for these user-specified parameters are made available to Pipeline steps via the params object

            Unassigned Unassigned
            peter_wolf Peter Wolf
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: