run_scenarios.sh 599 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. set -eu
  3. : "${DISTRIBUTION:=debian}"
  4. : "${DISTRIBUTION_VERSION:=12}"
  5. : "${CI_JOB_ID:=1}"
  6. : "${CI_COMMIT_REF_NAME:=develop}"
  7. export DISTRIBUTION DISTRIBUTION_VERSION CI_JOB_ID CI_COMMIT_REF_NAME
  8. echo "Running tests for ${CI_COMMIT_REF_NAME} on ${DISTRIBUTION}-${DISTRIBUTION_VERSION}…"
  9. cd "$(dirname $0)"
  10. docker compose build
  11. # shellcheck disable=SC2043
  12. for SCENARIO in $(cd scenarios; ls -1)
  13. do
  14. docker compose down --timeout 0
  15. docker compose up -d
  16. docker compose exec zammad bash "/scenarios/${SCENARIO}/${DISTRIBUTION}.sh"
  17. docker compose down --timeout 0
  18. done
  19. ./cleanup.sh