File tree Expand file tree Collapse file tree 3 files changed +34
-12
lines changed Expand file tree Collapse file tree 3 files changed +34
-12
lines changed Original file line number Diff line number Diff line change 1
- version : ' 3'
2
-
3
1
# run tests: cd ci/unit; docker-compose up --build --force-recreate
4
2
# manual: cd ci/unit; docker-compose run logstash bash
5
3
services :
Original file line number Diff line number Diff line change @@ -12,14 +12,12 @@ pull_docker_snapshot() {
12
12
echo " docker pull successful"
13
13
else
14
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
- ;;
15
+ " 8.previous" |" 8.current" |" 8.next" )
16
+ exit 1
17
+ ;;
18
+ * )
19
+ exit 2
20
+ ;;
23
21
esac
24
22
fi
25
23
}
Original file line number Diff line number Diff line change 1
1
before_install :
2
2
- mkdir -p .ci && curl -sL https://github.com/logstash-plugins/.ci/archive/1.x.tar.gz | tar zxvf - --skip-old-files --strip-components=1 -C .ci --wildcards "*Dockerfile*" "*docker*" "*.sh"
3
- install : .ci/docker-setup.sh
4
- script : .ci/docker-run.sh
3
+ install :
4
+ - .ci/docker-setup.sh
5
+ - exit_code=$?
6
+ - |
7
+ case $exit_code in
8
+ 0)
9
+ echo "Install succeeded."
10
+ ;;
11
+ 1)
12
+ echo "Failed to pull logstash-${ELASTIC_STACK_VERSION}. Likely due to missing DRA build."
13
+ export SKIP_SCRIPT=true
14
+ ;;
15
+ 2)
16
+ echo "Failed to pull logstash-${ELASTIC_STACK_VERSION}. The image should exist. Aborting build."
17
+ exit $exit_code
18
+ ;;
19
+ *)
20
+ echo "Install failed with an unexpected code: $exit_code. Stopping build."
21
+ exit $exit_code
22
+ ;;
23
+ esac
24
+ script :
25
+ - |
26
+ if [ "$SKIP_SCRIPT" = "true" ]; then
27
+ exit 0
28
+ else
29
+ .ci/docker-run.sh
30
+ fi
You can’t perform that action at this time.
0 commit comments