-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
docker: Automate deletion of docker static Jenkins nodes #3561
Conversation
Does this mean you got around the problems you were having with calling in from python? |
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/remove_container/tasks/main.yml
Outdated
Show resolved
Hide resolved
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/remove_container/tasks/main.yml
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm missing a little bit of higher level context here
This should have an update to the doc at https://github.com/adoptium/infrastructure/blob/master/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/README.md to cover the use of this new functionality :-)
This seems to be the only reference to that variable in this PR so it possibly needs a bit of clarification
I guess it's intended to be a parameter when you run the playbook?
Docs update here #3562 |
Can the doc change be cherry-picked across to this PR? It would be nicer to have the doc update and the code change in one. |
Done |
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/remove_container/scripts/deleteNodes.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now - thanks :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, semgrep warning is related to a sample command in docs, and can be ignored.
ref #3506
The python script does most of the work; it deletes the node in Jenkins (if the node is idle).
Ansible then looks up the machines names and ports in DockerInventory.json and removes the associated container on the dockerhost machine.
The python script uses a jenkins username and api token, so these need to be added to the secrets repo.