Skip to content

Commit 7056966

Browse files
author
Axel von Bertoldi
committed
Allow overriding FILTER_FLAG in clear-docker-cache script
In https://gitlab.com/gitlab-org/gitlab-runner/-/issues/38647 users would like to reuse the clear-docker-cache to delete object that don't match the FILTER_FLAG. Make it overrideable.
1 parent d7c152f commit 7056966

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packaging/root/usr/share/gitlab-runner/clear-docker-cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fi
1616
DOCKER_API_VERSION=$(docker version --format '{{.Client.APIVersion}}')
1717
DOCKER_CLIENT_VERSION=$(docker version --format '{{.Client.Version}}')
1818
REQUIRED_DOCKER_API_VERSION=1.25
19-
FILTER_FLAG='label=com.gitlab.gitlab-runner.managed=true'
19+
FILTER_FLAG="${FILTER_FLAG:-label=com.gitlab.gitlab-runner.managed=true}"
2020

2121
usage() {
2222
echo -e "\nUsage: $0 prune-volumes|prune|space|help\n"

0 commit comments

Comments
 (0)