Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Fix set -e abort in e2e-prepare-containers when last service is disabled (#75150)

Nemanja Glumaccbe349cac95a
diff --git a/.github/actions/e2e-prepare-containers/action.yml b/.github/actions/e2e-prepare-containers/action.yml
index 19961985346..6fce32763e2 100644
--- a/.github/actions/e2e-prepare-containers/action.yml
+++ b/.github/actions/e2e-prepare-containers/action.yml
@@ -67,19 +67,18 @@ runs:
cd e2e/test/scenarios/
- SERVICES="\
- $([ ${{ inputs.postgres }} = true ] && echo 'postgres-sample') \
- $([ ${{ inputs.mysql }} = true ] && echo 'mysql-sample') \
- $([ ${{ inputs.mongo }} = true ] && echo 'mongo-sample') \
- $([ ${{ inputs.maildev }} = true ] && echo 'maildev') \
- $([ ${{ inputs.maildev }} = true ] && echo 'maildev-ssl') \
- $([ ${{ inputs.openldap }} = true ] && echo 'ldap') \
- $([ ${{ inputs.webhook }} = true ] && echo 'webhook-tester') \
- $([ ${{ inputs.snowplow }} = true ] && echo 'snowplow-micro')"
+ SERVICES=()
+ [ "${{ inputs.postgres }}" = true ] && SERVICES+=(postgres-sample)
+ [ "${{ inputs.mysql }}" = true ] && SERVICES+=(mysql-sample)
+ [ "${{ inputs.mongo }}" = true ] && SERVICES+=(mongo-sample)
+ [ "${{ inputs.maildev }}" = true ] && SERVICES+=(maildev maildev-ssl)
+ [ "${{ inputs.openldap }}" = true ] && SERVICES+=(ldap)
+ [ "${{ inputs.webhook }}" = true ] && SERVICES+=(webhook-tester)
+ [ "${{ inputs.snowplow }}" = true ] && SERVICES+=(snowplow-micro)
for attempt in 1 2 3; do
echo "Docker compose up attempt $attempt of 3..."
- if docker compose up $SERVICES -d; then
+ if docker compose up "${SERVICES[@]}" -d; then
echo "Docker compose up succeeded on attempt $attempt"
break
fi