Commit 6c806be7 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg

Add gitlab ci configh

parent 56df0771
......@@ -4,72 +4,37 @@ variables:
KUBE_PROD_DOMAIN: saml2int.org # The main domain for your application.
KUBE_TEST_DOMAIN: saml2int.paas2.uninett.no # A domain which test versions of your application can be launched under.
HTTP_PORT: '80' # The port number of the web server.
stages:
- build
- test
- review
# - test
- staging
- production
build:
stage: build
script:
- command build
- build
only:
- branches
production:
stage: production
variables:
CI_ENVIRONMENT_URL: https://$KUBE_PROD_DOMAIN
script:
- command deploy kubernetes/deployment.yaml
- deploy etc/kubernetes/deployment.yaml
environment:
name: production
url: http://$KUBE_PROD_DOMAIN
url: https://$KUBE_PROD_DOMAIN
variables:
URL: https://$KUBE_PROD_DOMAIN
when: manual
only:
- master
staging:
stage: staging
variables:
CI_ENVIRONMENT_URL: http://staging.$KUBE_TEST_DOMAIN
script:
- command deploy kubernetes/deployment.yaml
- deploy etc/kubernetes/deployment.yaml
environment:
name: staging
url: http://staging.$KUBE_TEST_DOMAIN
only:
- master
review:
stage: review
url: https://$KUBE_TEST_DOMAIN
variables:
CI_ENVIRONMENT_URL: http://$CI_ENVIRONMENT_SLUG.$KUBE_TEST_DOMAIN
script:
- command deploy kubernetes/deployment.yaml
environment:
name: review/$CI_BUILD_REF_NAME
url: http://$CI_ENVIRONMENT_SLUG.$KUBE_TEST_DOMAIN
on_stop: stop_review
only:
- branches
except:
- master
stop_review:
stage: review
variables:
GIT_STRATEGY: none
script:
- command destroy
environment:
name: review/$CI_BUILD_REF_NAME
action: stop
when: manual
URL: https://$KUBE_TEST_DOMAIN
only:
- branches
except:
- master
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