Skip to content

UnixPB: Add Docker Housekeeping Role #3973

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

steelhead31
Copy link
Contributor

@steelhead31 steelhead31 commented Jul 8, 2025

Fixes #3797

Checklist
  • commit message has one of the standard prefixes
  • other documentation is changed or added (if applicable)
  • playbook changes run through VPC or QPC (if you have access)

✔️ VPC : https://ci.adoptium.net/job/VagrantPlaybookCheck/2126/

10:52:40 [VagrantPlaybookCheck » Ubuntu1804,vagrant](https://ci.adoptium.net/job/VagrantPlaybookCheck/OS=Ubuntu1804,label=vagrant/) completed with result SUCCESS
10:52:40 [VagrantPlaybookCheck » CentOS8,vagrant](https://ci.adoptium.net/job/VagrantPlaybookCheck/OS=CentOS8,label=vagrant/) completed with result SUCCESS
10:52:40 [VagrantPlaybookCheck » Ubuntu2204,vagrant](https://ci.adoptium.net/job/VagrantPlaybookCheck/OS=Ubuntu2204,label=vagrant/) completed with result SUCCESS
10:52:40 [VagrantPlaybookCheck » Ubuntu2404,vagrant](https://ci.adoptium.net/job/VagrantPlaybookCheck/OS=Ubuntu2404,label=vagrant/) completed with result SUCCESS
11:16:07 [VagrantPlaybookCheck » Fedora40,vagrant](https://ci.adoptium.net/job/VagrantPlaybookCheck/OS=Fedora40,label=vagrant/) completed with result SUCCESS
11:16:07 [VagrantPlaybookCheck » Ubuntu2004,vagrant](https://ci.adoptium.net/job/VagrantPlaybookCheck/OS=Ubuntu2004,label=vagrant/) completed with result SUCCESS
11:34:07 [VagrantPlaybookCheck » Debian10,vagrant](https://ci.adoptium.net/job/VagrantPlaybookCheck/OS=Debian10,label=vagrant/) completed with result SUCCESS
13:18:27 [VagrantPlaybookCheck » CentOS7,vagrant](https://ci.adoptium.net/job/VagrantPlaybookCheck/OS=CentOS7,label=vagrant/) completed with result SUCCESS

@steelhead31 steelhead31 force-pushed the docker_hk branch 3 times, most recently from 2b283f0 to 6f0a9fd Compare July 8, 2025 11:05
@steelhead31
Copy link
Contributor Author

Sample crontab entry..

#Ansible: Container housekeeping
30 2 * * * /usr/local/bin/housekeep_docker.sh check >> /var/log/docker_housekeeping.log 2>&1

@steelhead31
Copy link
Contributor Author

When run with the following:

ansible-playbook -i hosts AdoptOpenJDK_Unix_Playbook/main.yml --extra-vars "script_action=delete"

Crontab entry appears as follows:

#Ansible: Container housekeeping
30 2 * * * /usr/local/bin/housekeep_docker.sh delete >> /var/log/docker_housekeeping.log 2>&1

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

A block has been put on this Pull Request as this repository is temporarily under a code freeze due to an ongoing release cycle.

If this pull request needs to be merged during the release cycle then please comment /merge and a PMC member will be able to remove the block.

If the code freeze is over you can remove this block by commenting /thaw.

@steelhead31 steelhead31 requested a review from sxa July 14, 2025 07:56
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'll probably come back and have another more detailed read through this but this looks good overall.
Also bonus points for writing the script for sh and not bash ;-)

@steelhead31
Copy link
Contributor Author

I'll probably come back and have another more detailed read through this but this looks good overall. Also bonus points for writing the script for sh and not bash ;-)

I had issues with bash on one of my vagrant boxes ( though I don't recall which one.. ) also lucky it didn't end up in ksh! 😆

@steelhead31 steelhead31 marked this pull request as ready for review July 15, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement policy for managing docker build caches
2 participants