Im using Extended Choice Parameter in Jenkins. I want to add a drop down parameter in the job and display all folder names within the given directory using a groovy script
how can i do that ?
Im using Extended Choice Parameter in Jenkins. I want to add a drop down parameter in the job and display all folder names within the given directory using a groovy script
how can i do that ?
Copyright © 2021 Jogjafile Inc.
You can use the following groovy script in the extended choice parameter to list all folders under a given folder (You will probably require an admin approval to run this script):
However, an easier option will be to use the Filesystem List Parameter Plugin.
The plugin lists file, directory or symlink names of a defined directory and exposes them as selection options for the parameter.
It also supports include/exclude patterns and execution on different nodes .