diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 361730b..8da6228 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,9 +12,9 @@ extract_client_definition: after_script: - echo "CI_COMMIT_BRANCH:$CI_COMMIT_BRANCH" - URL="/" - - if [ $CI_COMMIT_BRANCH = test_deployment_v* ]; then URL="https://test.webservices.krohne.com/"; fi - - if [ $CI_COMMIT_BRANCH = development_deployment_v* ]; then URL="https://dev.webservices.krohne.com/"; fi - - if [ $CI_COMMIT_BRANCH = production_deployment_v* ]; then URL="https://prod.webservices.krohne.com/"; fi + - if [[ "$CI_COMMIT_BRANCH" =~ ^test_deployment_v[[:digit:]] ]]; then URL="https://test.webservices.krohne.com/"; fi + - if [[ "$CI_COMMIT_BRANCH" =~ ^development_deployment_v[[:digit:]] ]]; then URL="https://dev.webservices.krohne.com/"; fi + - if [[ "$CI_COMMIT_BRANCH" =~ ^production_deployment_v[[:digit:]] ]]; then URL="https://prod.webservices.krohne.com/"; fi - echo "URL:$URL" - cat ws.json | jq 'setpath(["servers", 0, "url"]; "'$URL'")' > ws.json-new - cat ws.json-new