diff --git a/test-and-deploy.yml b/test-and-deploy.yml index 5e1496cb8ad9bb3df6535195876ddecac4dc565e..3879b7efdd9e224813b480fda4cdcecb245f32b9 100644 --- a/test-and-deploy.yml +++ b/test-and-deploy.yml @@ -5,9 +5,6 @@ stages: - test - deploy -variables: - DBREQUIRED: "no" - .wait: script: - while [ ! -f /tmp/foo.txt ]; do echo "waiting..."; sleep 1; done @@ -58,6 +55,7 @@ variables: variables: GIT_STRATEGY: none script: | + DBREQUIRED="no" if [[ "$CI_COMMIT_REF_NAME" == "master" ]]; then DBREQUIRED="yes" elif [[ "$CI_COMMIT_REF_NAME" == *"[PULL_DB]"* ]]; then @@ -75,6 +73,12 @@ variables: fi fi fi + export $DBREQUIRED + if [[ "$DBREQUIRED" == "yes" ]]; then + echo "DB need to be pulled." + else + echo "No pulling required." + fi except: variables: - $CAE