-
Notifications
You must be signed in to change notification settings - Fork 31
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
[DROOLS-7638]"docker system prune -f" fails in GHA #82
[DROOLS-7638]"docker system prune -f" fails in GHA #82
Conversation
18e8834
to
32066d4
Compare
Hmm,
resulted in
It means We may just proceed when we hit "a prune operation is already running". |
32066d4
to
cf37b33
Compare
Okay. In Kogito Downstream / kogito-apps,
GHA skips |
.ci/buildchain-config.yaml
Outdated
@@ -25,7 +25,7 @@ default: | |||
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} | |||
after: | |||
current: | | |||
docker system prune -f | |||
bash -c "docker system prune -f 2>&1 | grep -q 'a prune operation is already running' && echo 'Prune operation already in progress. Skipping this command.' || true" |
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.
maybe better to use different command than prune
?
see this for instance docker/for-mac#2501
As recommended docker rmi $(docker images -f "dangling=true"-q)
is logging the progress
0a57959
to
7c94a45
Compare
- Use docker rmi rather than prune because prune could be faulty and slow
7c94a45
to
6967ba9
Compare
@@ -25,7 +25,7 @@ default: | |||
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} | |||
after: | |||
current: | | |||
docker system prune -f | |||
bash -c "if [ -n \"$(docker images -f dangling=true -q)\" ]; then docker rmi $(docker images -f dangling=true -q); else echo 'No dangling images to remove.'; fi" |
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.
Used if
block because docker rmi
fails if there is no dangling images.
@mareknovotny Thanks, replaced with
Actually, there is no dangling images in this case. But I think it's good to go. |
@rgdoliveira @mareknovotny Please review, thanks! |
JIRA:
https://issues.redhat.com/browse/DROOLS-7638