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

no parameter type in Jenkinsfile for “List Subversion tags (and more)”

XMLWordPrintable

      It doesn't seem possible to define a parameter of type “List Subversion tags (and more)” in a (declarative) pipeline script. The parameter type is available in the Web GUI and works as expected when starting a job. I want to define all parameters in the Jenkinsfile which is stored in SVN instead of using the Web GUI for every job.

      In https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#handling-parameters or https://www.jenkins.io/doc/book/pipeline/syntax/#parameters there is no documentation of the syntax for a parameter of this type.

      Despite the missing documentation I tried to add such a parameter using strings from the source code of the subversion plugin and checked the code with the Jenkins linter. A line like

      listSubversionTags(name: 'PARAM_SVN_BRANCH', tagsDir: 'https://server/svn/path/to/repo/base', credentialsId: '12345678-9abc-def0-1234-56789abcdef0', defaultValue: 'trunk', reverseByDate: true)

      results in an error message which lists the possible parameter types

      WorkflowScript: 9: Invalid parameter type listSubversionTags. Valid parameter types: [booleanParam, buildSelector, choice, credentials, file, text, separator, password, persistentBoolean, persistentChoice, persistentString, persistentText, run, string] @ line {{9, column 6.}}

      The list of parameter types corresponds to the parameter type selection in the Web GUI, with the exception that a type for “List Subversion tags (and more)” is missing between file and text.

      Boolean Parameter (= booleanParam)

      File Parameter (= file)
      List Subversion tags (and more) (missing here)
      Multi-line String Parameter (= text)

      String Parameter (= string)

       

      This might mean that the parameter type “List Subversion tags (and more)” is not available in a pipeline script.

      Is this a bug or missing feature of the subversion plugin?
      Is there a way to define a parameter of this type in a (declarative) pipeline script?

            Unassigned Unassigned
            bomm Bodo .
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: