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

docker: Automate deletion of docker static Jenkins nodes #3561

Merged
merged 13 commits into from May 16, 2024

Conversation

Haroon-Khel
Copy link
Contributor

@Haroon-Khel Haroon-Khel commented May 10, 2024

  • commit message has one of the standard prefixes
  • faq.md updated if appropriate
  • other documentation is changed or added (if applicable)
  • playbook changes run through VPC or QPC (if you have access)
  • VPC/QPC not applicable for this PR
  • for inventory.yml changes, bastillion/nagios/jenkins updated accordingly

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.

@sxa
Copy link
Member

sxa commented May 10, 2024

Does this mean you got around the problems you were having with calling in from python?

Copy link
Member

@sxa sxa left a 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?

@Haroon-Khel
Copy link
Contributor Author

Docs update here #3562

@sxa
Copy link
Member

sxa commented May 14, 2024

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.

@github-actions github-actions bot added the doc label May 14, 2024
@Haroon-Khel
Copy link
Contributor Author

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

Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now - thanks :-)

Copy link
Contributor

@steelhead31 steelhead31 left a 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.

@karianna karianna merged commit 18ae259 into adoptium:master May 16, 2024
11 of 12 checks passed
@Haroon-Khel Haroon-Khel deleted the delete.jenkins.node branch May 16, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants