-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
_common.sh
34 lines (26 loc) · 1.06 KB
/
_common.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
set -euxfo pipefail;
DOCKER_REPOSITORY="racket/racket";
# We used to push images to the jackfirth/racket DockerHub repo instead
# of racket/racket. For backwards compatibility, we still push the images
# to that repo in addition to the primary racket/racket repo.
SECONDARY_DOCKER_REPOSITORY="jackfirth/racket";
find_images () {
declare -r repository="${1}";
# Grab all of the racket images whose "tag"s start with a digit.
docker images --format '{{.Repository}}:{{.Tag}}' | \
(grep "^${repository}:[[:digit:]]" || true) | \
sort;
# Grab `latest` and `snapshot` images if available.
docker images --format '{{.Repository}}:{{.Tag}}' | \
(grep "^${repository}:\(latest\|snapshot\)" || true) | \
sort;
}
find_testable_images () {
declare -r repository="${1}";
# Version 6.0 is ignored during test runs because its openssl
# bindings are broken.
#
# xref: https://github.com/jackfirth/racket-docker/issues/35
find_images "${repository}" | grep --invert-match "${repository}:6.0"
}