deploy #5

Manually merged
kleph merged 6 commits from deploy into master 2020-02-26 01:32:36 +01:00
Showing only changes of commit 5c21884be4 - Show all commits

View file

@ -57,42 +57,6 @@ steps:
depends_on: depends_on:
- unit tests - unit tests
---
kind: pipeline
name: deploy-staging
steps:
- name: deploy-staging
image: sinlead/drone-kubectl
settings:
kubernetes_server:
from_secret: kubectl_uri
kubernetes_cert:
from_secret: kubectl_cert
kubernetes_token:
from_secret: kubectl_token
environment:
IMAGE_TAG: ${DRONE_COMMIT_SHA:0:8}
commands:
- export NAMESPACE=beer-staging-${DRONE_COMMIT_SHA:0:4}
- echo "== create staging namespace $${NAMESPACE}"
- sed "s/__NAMESPACE__/$${NAMESPACE}/g" kube/beer-namespace.yaml > kube/beer-namespace-staging.yaml
- kubectl apply -f kube/beer-namespace-staging.yaml
- echo "== deploy staging"
- sed "s/__IMAGE_TAG__/$${IMAGE_TAG}/g" kube/beer-deployment.yaml > kube/beer-deployment-staging.yaml
- kubectl apply -f kube/beer-deployment-staging.yaml --namespace=$${NAMESPACE}
- echo "== post deploy status:"
- kubectl get deployments --namespace=$${NAMESPACE}
- kubectl get pods --namespace=$${NAMESPACE}
depends_on:
- build
when:
branch:
exclude:
- master
--- ---
kind: pipeline kind: pipeline
name: deploy name: deploy