Skip to content

Instantly share code, notes, and snippets.

@visitbethel
Last active June 21, 2019 16:41
Show Gist options
  • Save visitbethel/462fb09549900668d155289a8ccac208 to your computer and use it in GitHub Desktop.
Save visitbethel/462fb09549900668d155289a8ccac208 to your computer and use it in GitHub Desktop.
node {
// Change `url` value to your own
stage('Get Tags') {
// Change `message` value to the message you want to display
// Change `description` value to the description you want
def selectedProperty = inputParamsString('hello')
println "Property: $selectedProperty"
}
stage 'Done'
// Change `job` value to your downstream job name
// Change `name` value to the name you gave the string parameter in your downstream job
}
@NonCPS
def inputParamsString(dir) {
def selectedProperty = input( id: 'userInput',
message: 'Choose properties file',
parameters: [ [$class: 'ListSubversionTagsParameterDefinition',
name: 'SVN_REPO',
tagsDir: 'https://conexus.prod.fedex.com:9443/subversion/sefs_commons/tags',
credentialsId: 'eb3bca34-c00f-4c48-bee9-5f953b8bce9e',
reverseByDate: true
] ])
}
===> Java
public class ListSubversionTagsParameterDefinition extends ParameterDefinition {
private static final long serialVersionUID = 1L;
/**
* The Subversion repository which contains the tags to be listed.
*/
private final String tagsDir;
private final String credentialsId;
private final String tagsFilter;
private final boolean reverseByDate;
private final boolean reverseByName;
private final String defaultValue;
private final String maxTags;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment