OpenLiberty / ci.docker

Eclipse Public License 1.0
42 stars 59 forks source link

Fail if server cannot start when populating SCC #428

Closed ymanton closed 11 months ago

ymanton commented 11 months ago

If the server fails to start when populating the SCC we should gracefully fail the build. Because the populate_scc.sh script sets the -e shell option, the shell will exit if any command returns non-zero, except in certain cases.

The populate_scc.sh script starts and stops the server in a compound expression using &&, which is one such case where a non-zero return from server start will be ignored.

Executing server start and server stop separately fixes this and has the desired behaviour; if the server fails to start execution will stop and the build will fail, rather than continuing on and leading to undefined behaviour.