First of all, apologize if this question has been already resolved previously. I was not able to find it. Also, I’m a novice configuring Jenkins but I was assigned to fix an issue that has been existing in one of the pipelines that we are using since several months ago
We have a pipeline that is using 26 active choices/active choices reactive parameters. They are using all dropdown lists and will be populated based on the references selected previously.
Some of them (the first two) have the options hardcoded in the Groovy script section and others are retrieving the options from a json file hosted on Github, by using JsonSlurperClassic method, in the Groovy script section.
The problem is when we started to choose the dropdown options. First two dropdowns are already with the following options:
- global and project
- non-prod and prod
Defaults are “project” and “non-prod”. If I change the first one to “project”, now the second dropdown takes about 20 seconds to display “non-prod” and “prod”.
Once I’m sure about my two choices, things get worse. Dropdowns reading source from Github (that have more than 2 options) also take about 20-30 seconds. Fetch and parse of the json file looks good. I even hardcoded all the options in the 3rd Groovy to see if the problem is the fetch/parse but I’ve got the same results.
Groovy scripts are really simple… Try/catch and they have less than 40 lines per file and the source jsons are less than 1 MB each.
I have been dealing with this since last week and I can’t find what is provoking the dropdowns to be too slow. Running a single job could take up to 3-5 minutes and just imagine if you did a mistake and select the wrong choice. You’ll need to rollback and start it again.
Once well populated, the job runs smoothly and Jenkins is 2.375.2, FYI.
Last but not least, I don’t have permissions to see the Jenkins management console/plugins version, connect to the runners/workers or run this locally
I will really appreciate any hint/guidance here. Thanks in advance!