deploy #5
2 changed files with 8 additions and 3 deletions
|
@ -48,7 +48,7 @@ steps:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: kleph/beer
|
repo: kleph/beer
|
||||||
tags: latest
|
tags: ${DRONE_COMMIT_SHA:0:8}
|
||||||
username:
|
username:
|
||||||
from_secret: dockerhub_username
|
from_secret: dockerhub_username
|
||||||
password:
|
password:
|
||||||
|
@ -71,11 +71,16 @@ steps:
|
||||||
from_secret: kubectl_cert
|
from_secret: kubectl_cert
|
||||||
kubernetes_token:
|
kubernetes_token:
|
||||||
from_secret: kubectl_token
|
from_secret: kubectl_token
|
||||||
|
environment:
|
||||||
|
IMAGE_TAG: ${DRONE_COMMIT_SHA:0:8}
|
||||||
commands:
|
commands:
|
||||||
|
- echo "== pre deploy status:"
|
||||||
- kubectl get pods --namespace=beer
|
- kubectl get pods --namespace=beer
|
||||||
- kubectl get deployments --namespace=beer
|
- kubectl get deployments --namespace=beer
|
||||||
- kubectl get svc --namespace=beer
|
- kubectl get svc --namespace=beer
|
||||||
- kubectl apply -f kube/beer-deployment.yaml --namespace=beer
|
- cat kube/beer-deployment.yaml > kube/beer-deployment-${IMAGE_TAG}.yaml
|
||||||
|
- kubectl apply -f kube/beer-deployment-${IMAGE_TAG}.yaml --namespace=beer
|
||||||
|
- echo "== post deploy status:"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build
|
||||||
|
|
|
@ -16,7 +16,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: beer
|
- name: beer
|
||||||
image: kleph/beer
|
image: kleph/beer:${IMAGE_TAG}
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5000
|
- containerPort: 5000
|
||||||
|
|
Loading…
Reference in a new issue