Skip to content

Commit

Permalink
Update autodeploy templates [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Jan 22, 2017
1 parent 86881f4 commit 5c444ae
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml
@@ -0,0 +1,76 @@
# Explaination on the scripts:
# https://gitlab.com/gitlab-examples/kubernetes-deploy/blob/master/README.md
image: registry.gitlab.com/gitlab-examples/kubernetes-deploy

variables:
# Application deployment domain
KUBE_DOMAIN: domain.example.com

stages:
- build
- test
- review
- staging
- production

build:
stage: build
script:
- command build
only:
- branches

production:
stage: production
variables:
CI_ENVIRONMENT_URL: http://production.$KUBE_DOMAIN
script:
- command deploy
environment:
name: production
url: http://production.$KUBE_DOMAIN
when: manual
only:
- master

staging:
stage: staging
variables:
CI_ENVIRONMENT_URL: http://staging.$KUBE_DOMAIN
script:
- command deploy
environment:
name: staging
url: http://staging.$KUBE_DOMAIN
only:
- master

review:
stage: review
variables:
CI_ENVIRONMENT_URL: http://$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
script:
- command deploy
environment:
name: review/$CI_BUILD_REF_NAME
url: http://$CI_ENVIRONMENT_SLUG.$KUBE_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
only:
- branches
except:
- master

0 comments on commit 5c444ae

Please sign in to comment.