Commit a66d90aa authored by Lucas dos Santos Abreu's avatar Lucas dos Santos Abreu
Browse files

v3

parent d36acec6
Pipeline #9023275 passed with stages
in 1 minute and 47 seconds
stages:
- build
- review
- staging
- production
- cleanup
variables:
KUBE_DOMAIN: getup.io
......@@ -19,6 +21,41 @@ build:
only:
- branches
review:
stage: review
image: lucassabreu/openshift-k8s-cli:latest
variables:
CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
environment:
name: r/$CI_COMMIT_REF_NAME
url: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
on_stop: stop_review
script:
- k8s/deploy
only:
- branches
except:
- master
stop_review:
stage: cleanup
image: lucassabreu/openshift-k8s-cli:latest
environment:
name: r/$CI_COMMIT_REF_NAME
action: stop
when: manual
variables:
GIT_STRATEGY: none
script:
- oc login "$KUBE_URL" --token "$KUBE_TOKEN"
- oc project "$KUBE_NAMESPACE"
- oc delete deployments -l "app=$CI_ENVIRONMENT_SLUG"
- oc delete all -l "app=$CI_ENVIRONMENT_SLUG"
only:
- branches
except:
- master
staging:
stage: staging
image: lucassabreu/openshift-k8s-cli:latest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment