跳至主要内容

博文

目前显示的是 十一月, 2024的博文

Dynamic validation of Jenkins parameters

原文链接 If you have developed CI/CD or Automation pipelines using Jenkins, you must have faced the challenge that there is a lack of one such parameter which can validate the input and show error message to user before they hit the build button. This was the headache I also experienced. After some research and playing with different plugins, I found that I can solve this with the help of Active Choices Plugin. Active Choices Plugin Active Choices Plugin provides three useful parameter types which can be updated dynamically with the help of groovy script. We are going to use Active Choices Reactive Reference Parameter for our use case. Active Choices Reactive Reference Parameter can read other input parameters and can be modified to show custom html dynamically (i.e. before clicking the build button.) Use Case We are going to observe the following use case here: We need a Jenkins pipeline which takes three string parameters: EMAIL_IDS, GITHUB_REPO and GITHUB_BRANCH. EMAIL_IDS and G...