'Jenkins - Configuring/Setting parameters through a script
I have a Jenkins job that is already set up with parameters; these parameters are job type, product set version, environment name, etc. Currently, this job is triggered manually but I am trying to automate it/remotely execute it. I have been looking at this article, specifically part 4.2 - the URL that my job is located at looks something like: https://[internal-link]:[port]/jenkins/view/[job-name]/[pipeline-name]
Would I be able to then configure the parameters of this job then? Would it be better to try and do this using a Python script and the requests library?
Solution 1:[1]
Would I be able to then configure the parameters of this job then?
Yes, you can use buildWithParameters as shown in the article to set your parameters in the same way you would set parameters during an ordinary API call.
Would it be better to try and do this using a Python script and the requests library?
There is no limitation as to what you use to send the API request. So yes, you could use Python and the requests library just fine. You could also use any other language/framework to achieve this as well.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | M B |
