diff --git a/Openshift.gitlab-ci.yml b/Openshift.gitlab-ci.yml index 6132921..014febc 100644 --- a/Openshift.gitlab-ci.yml +++ b/Openshift.gitlab-ci.yml @@ -39,13 +39,14 @@ test2: script: - "oc get services $APP 2> /dev/null || oc new-app . --name=$APP --strategy=docker" - "oc start-build $APP --from-dir=. --follow || sleep 3s || oc start-build $APP --from-dir=. --follow" - - "oc get routes $APP 2> /dev/null || oc expose service $APP --hostname=$APP.$OPENSHIFT_DOMAIN" + - "oc get routes $APP 2> /dev/null || oc expose service $APP --hostname=$APP_HOST" review: <<: *deploy stage: review variables: APP: $CI_BUILD_REF_NAME + APP_HOST: $CI_PROJECT_NAME-$CI_BUILD_REF_NAME.$OPENSHIFT_DOMAIN environment: name: review/$CI_BUILD_REF_NAME url: http://$CI_PROJECT_NAME-$CI_BUILD_REF_NAME.$OPENSHIFT_DOMAIN @@ -77,6 +78,7 @@ staging: stage: staging variables: APP: staging + APP_HOST: $CI_PROJECT_NAME-staging.$OPENSHIFT_DOMAIN environment: name: staging url: http://$CI_PROJECT_NAME-staging.$OPENSHIFT_DOMAIN @@ -88,6 +90,7 @@ production: stage: production variables: APP: production + APP_HOST: $CI_PROJECT_NAME.$OPENSHIFT_DOMAIN when: manual environment: name: production