Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate creation of node in jenkins after deploying static container #3507

Open
Tracked by #3368
Haroon-Khel opened this issue Apr 5, 2024 · 3 comments
Open
Tracked by #3368
Assignees

Comments

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented Apr 5, 2024

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

@Haroon-Khel
Copy link
Contributor Author

For 2Q when the project is created

@sxa
Copy link
Member

sxa commented Apr 8, 2024

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.

@Haroon-Khel
Copy link
Contributor Author

Haroon-Khel commented May 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants