smolnar82 opened a new pull request, #1150:
URL: https://github.com/apache/knox/pull/1150
## What changes were proposed in this pull request?
This PR addresses two related issues in the CI workflow:
**1. Prevent Docker image name collisions:**
Previously, `docker-compose.yml` used static image names for
`knox-dev-local`, `ldap`, and `knox` services. This could lead to image name
collisions when multiple CI workflows ran concurrently, causing build failures
or unexpected behavior.
To resolve this, the image names have been updated to include a unique
identifier `${GITHUB_RUN_ID:-local}`. This ensures that each CI run builds and
uses distinct images, preventing conflicts.
**2. Clean up dangling Docker images after CI tests:**
With the introduction of unique image names per CI run, it became
necessary to ensure these images are properly cleaned up.
The previous "Tear Down Docker Compose" step (`docker compose down
--volumes`) only removed containers and volumes, leaving the built images
behind.
This PR modifies the `docker compose down` command in `tests.yml` to include
the `--rmi all` flag. This will remove all images used by the services after
the tests are completed, preventing the accumulation of dangling images on the
CI runners and optimizing disk space usage.
## How was this patch tested?
Running the tests here, in this PR.
## Integration Tests
N/A
## UI changes
N/A
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]