I created a Jenkins pipeline that creates a backup of a Oracle Database and storage in a Gitlab repository, and if necessary, execute a rollback, so I want to create a drop-down list with a files in this Gitlab repository to can select exactly what backup I want to execute, this in a Stage block of Jenkins pipeline. It is possible?
Thanks
CodePudding user response:
You can't create a dropdown list within a stage
block in Jenkins, because the pipeline variables have already been determined by that point (from the properties([ parameters ([])])
blocks).
You can create a select list in the parameters block, but that wouldn't allow you to dynamically select from a list of files. Alternatively you could create a bunch of manual jobs based on a list of files, and kick off just the ones you need, but this doesn't seem like a CI/CD pattern that will scale well. You may want to figure out a better way to perform this job.