deploy #5
1 changed files with 0 additions and 36 deletions
36
.drone.yml
36
.drone.yml
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue