diff --git a/templates/test_jobs.gitlab-ci.yml b/templates/test_jobs.gitlab-ci.yml index 9db45860a045b47d9c7e348b1dee8d722abbe56a..d283c610d21f4d6a5daf7b9b80333e8a32ade393 100644 --- a/templates/test_jobs.gitlab-ci.yml +++ b/templates/test_jobs.gitlab-ci.yml @@ -91,6 +91,19 @@ include: # intentionally use setup way chosed in haf_api_node compose scripts POSTGRES_URL: "postgresql://haf_admin@haf-instance/haf_block_log" command: ["install_app"] + entrypoint: + - '/bin/bash' + - '-c' + - | + set -xeuo pipefail + echo "Attempting to perform application setup..." + # pass control to the default image entrypoint + "./docker_entrypoint.sh" "$@" + echo "Application setup completed, starting to listed app port to satisfy Gitlab health checker..." + # Once setup completed, just listen on container/app port to satisfy GitlabCI HealthChecker + nc -v -l -p $(echo "${HAF_APP_PORT}") + # arg $0 should be explicitly passed when using 'bash -c' entrypoints + - '/bin/bash' - name: ${HAF_APP_IMAGE} alias: app