Open Haroon-Khel opened 3 months ago
For 2Q when the project is created
Python's jenkins library should facilitate this
We also have some groovy code for this in https://github.com/adoptium/jenkins-helper/blob/master/src/NodeHelper.groovy which may be useful.
Experimented with https://pypi.org/project/jenkinsapi/ and https://pypi.org/project/python-jenkins/. I hit this error on both of their create_node/slave()
function
File "/Users/hkhel/Library/Python/3.9/lib/python/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://ci.adoptium.net/computer/doCreateItem
Doesnt look like a permissions error.
I tried using ansible's jenkins_script module which allows for executing groovy commands on a jenkins server, https://docs.ansible.com/ansible/latest/collections/community/general/jenkins_script_module.html, no luck
Putting this on the back burner for a while. I've closed the epic it belongs to because I have completed its main objectives
An additional feature of the dockernode.yml playbook will be to automate the creation of the jenkins node of a newly deployed container. Python's jenkins library should facilitate this