@@ -8,7 +8,20 @@ pull_docker_snapshot() {
8
8
project=" ${1?project name required} "
9
9
local docker_image=" docker.elastic.co/${project} /${project}${DISTRIBUTION_SUFFIX} :${ELASTIC_STACK_VERSION} "
10
10
echo " Pulling $docker_image "
11
- docker pull " $docker_image "
11
+ if docker pull " $docker_image " ; then
12
+ echo " docker pull successful"
13
+ else
14
+ case " $ELASTIC_STACK_VERSION_ARG " in
15
+ " 8.previous" |" 8.current" |" 8.next" )
16
+ echo " Failed to pull logstash-${ELASTIC_STACK_VERSION} . Likely due to missing DRA build, skipping."
17
+ exit 0
18
+ ;;
19
+ * )
20
+ echo " Failed to pull logstash-${ELASTIC_STACK_VERSION} . The image should exist, failing the build.."
21
+ exit 1
22
+ ;;
23
+ esac
24
+ fi
12
25
}
13
26
14
27
VERSION_URL=" https://raw.githubusercontent.com/elastic/logstash/main/ci/logstash_releases.json"
@@ -19,8 +32,11 @@ if [ -z "${ELASTIC_STACK_VERSION}" ]; then
19
32
exit 1
20
33
fi
21
34
35
+ # save the original arg if needed
36
+ ELASTIC_STACK_VERSION_ARG=" $ELASTIC_STACK_VERSION "
37
+
22
38
echo " Fetching versions from $VERSION_URL "
23
- VERSIONS=$( curl $VERSION_URL )
39
+ VERSIONS=$( curl -s $VERSION_URL )
24
40
25
41
if [[ " $SNAPSHOT " = " true" ]]; then
26
42
ELASTIC_STACK_RETRIEVED_VERSION=$( echo $VERSIONS | jq ' .snapshots."' " $ELASTIC_STACK_VERSION " ' "' )
@@ -35,6 +51,9 @@ if [[ "$ELASTIC_STACK_RETRIEVED_VERSION" != "null" ]]; then
35
51
ELASTIC_STACK_RETRIEVED_VERSION=" ${ELASTIC_STACK_RETRIEVED_VERSION# \" } "
36
52
echo " Translated $ELASTIC_STACK_VERSION to ${ELASTIC_STACK_RETRIEVED_VERSION} "
37
53
export ELASTIC_STACK_VERSION=$ELASTIC_STACK_RETRIEVED_VERSION
54
+ elif [[ " $ELASTIC_STACK_VERSION " == " 8.next" ]]; then
55
+ # we know "8.next" only exists between FF and GA of a minor
56
+ exit 0
38
57
fi
39
58
40
59
case " ${DISTRIBUTION} " in
0 commit comments