paul-rogers commented on code in PR #13940:
URL: https://github.com/apache/druid/pull/13940#discussion_r1139429935
##########
.github/workflows/reusable-revised-its.yml:
##########
@@ -72,6 +72,15 @@ jobs:
path: ./**/target
key: maven-${{ runner.os }}-${{ inputs.build_jdk }}-targets-${{
github.sha }}
+ - name: Clean up docker
+ run: |
+ USER_NAME=$(whoami)
+ echo "Force stopping all containers and pruning"
+ docker ps -aq | xargs -r docker rm -f
+ docker system prune -af --volumes
+ echo "Deleting files in workspace not owned by $USER_NAME"
+ sudo find $GITHUB_WORKSPACE ! -uid $(id -ru $USER_NAME) -delete
-print
Review Comment:
Another thought is that this might want to move into `it.sh` as, say, `it.sh
clean` so we can reuse it rather than doing copy/paste. There seems nothing
here that uses GHA-specific commands: all are shell commands, aren't they? In
PR #13877, there now commands for two of the tasks:
* `it.sh prune-containers` will print any still-running containers, then
prune them.
* `it.sh prune-volumes` does what it says
Both were created/modified to mimic that lines you have here.
Also, `it.sh` has a `github` option to run the test. Cleanup should probably
be done there if it is GHA-specific. Went ahead and added the above to the list
of commands we already run.
This leaves only the owned-by-someone-else file cleanup, which is a case I
don't fully understand.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]