Can I add a parameter "List Subversion tags (and more)" in a Jenkinsfile? [subversion-plugin]

I want to define job parameters for a declarative pipeline in the Jenkinsfile according to the documentation section “Handling parameters”: Using a Jenkinsfile
The documentation of the syntax lists only standard parameters, apparently not parameters added by plugins: Pipeline Syntax

Where can I find the syntax for a parameter “List Subversion tags (and more)” in a (declarative) pipeline script?

Edit:

Based on the source code of the subversion plugin I tried to add a parameter like this:
listSubversionTags(name: 'PARAM_SVN_BRANCH', tagsDir: 'https://server/svn/path/to/repo/base', credentialsId: '12345678-9abc-def0-1234-56789abcdef0', defaultValue: 'trunk', reverseByDate: true)

The Jenkins linter reports this error:

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 selection in the Web GUI, but 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?

I created an issue: JENKINS-69392

As a work-around I was able to define the parameter of type “List Subversion tags” in scripted style instead after a declarative style pipeline specification, see [JENKINS-69392] no parameter type in Jenkinsfile for “List Subversion tags (and more)” - Jenkins Jira for an (untested) example.

1 Like

Thanks for your feedback @bomm and welcome to this community :wave: