Skip to content

Commit d80dee4

Browse files
authored
Update docker-setup.sh to not preemptively pull snapshot images anymore (#67)
the docker compose will pull the images during build, so it's no necessary to pull the snapshot images upfront. it should still check if they exist though, so we can gracefully handle the case when previous/current/next are missing.
1 parent 40639ba commit d80dee4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docker-setup.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
# Ensure you have Docker installed locally and set the ELASTIC_STACK_VERSION environment variable.
55
set -e
66

7-
pull_docker_snapshot() {
7+
check_docker_snapshot() {
88
project="${1?project name required}"
99
stack_version_alias="${2?stack version alias required}"
1010
local docker_image="docker.elastic.co/${project}/${project}${DISTRIBUTION_SUFFIX}:${ELASTIC_STACK_VERSION}"
11-
echo "Pulling $docker_image"
12-
if docker pull "$docker_image" ; then
13-
echo "docker pull successful"
11+
echo "Checking manifest for $docker_image"
12+
if docker manifest inspect "$docker_image" ; then
13+
echo "docker image exists. proceeding..."
1414
else
1515
case $stack_version_alias in
1616
"8.previous"|"8.current"|"8.next"|"8.future")
@@ -65,7 +65,7 @@ export DISTRIBUTION_SUFFIX
6565
echo "Testing against version: $ELASTIC_STACK_VERSION (distribution: ${DISTRIBUTION:-"default"})"
6666

6767
if [[ "$ELASTIC_STACK_VERSION" = *"-SNAPSHOT" ]]; then
68-
pull_docker_snapshot "logstash" $ELASTIC_STACK_VERSION_ALIAS
68+
check_docker_snapshot "logstash" $ELASTIC_STACK_VERSION_ALIAS
6969
fi
7070

7171
if [ -f Gemfile.lock ]; then

0 commit comments

Comments
 (0)