![]() We will first create a sample pipeline project for this.We will see how we can configure the Active Choices parameter and Active Choices Reactive parameter. In this use case, we will see how to render a dropdown with dynamic values using Active Choices Reactive parameters. Render values dynamically based on the selection in other build parameter The Active Choices Parameter plugin is installed on Jenkins.This plugin requires Jenkins version >= 2.204.1.Detailed explanation on the use case in this section Prerequisites So, we can have a checkbox and textbox side-by-side which was not possible in earlier cases. We can achieve this using the Active Choices Reactive Reference Parameter as it lets us render HTML components dynamically using some Groovy script. If we want the user to select which services he/she wants to deploy along with the release tag for that service, we need one extra control to ask the user for the release tag for the service he/she has selected. Think of a deployment pipeline for a 3 tier application where we have to deploy multiple services for each tier. ![]() Active Choices Reactive Reference Parameter Consider the above example of state, if we want to render all the cities for the state selected then we can use the Active Choices Reactive parameter and refer to the state parameter so that we can use the value of state parameter in the Groovy script for cities parameter. When we want to generate the dropdown of checkboxes based on the value returned from an API call plus selection in other dependent build parameters. For example, we can make an API call to fetch all the country’s states and return it as a Groovy list so they will be rendered as a dropdown list. When we want to generate the dropdown of checkboxes dynamically via some value returned from the API. We can add JavaScript and CSS styling as well to the HTML controls we are rendering using this parameter.Īctive Choices use cases Active Choices Parameter We can render the dynamically generated HTML from Groovy script, and it can render it well on the UI page.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |