mirror of
https://github.com/honestbee/drone-kubernetes.git
synced 2025-09-10 23:53:21 +00:00
Add handling environments
This commit is contained in:
parent
26454722a6
commit
3042727362
2 changed files with 37 additions and 3 deletions
28
README.md
28
README.md
|
@ -12,9 +12,35 @@ This pipeline will update the `my-deployment` deployment with the image tagged `
|
|||
deployment: my-deployment
|
||||
repo: myorg/myrepo
|
||||
container: my-container
|
||||
namespace: default
|
||||
tag: ${DRONE_COMMIT_SHA:8}
|
||||
|
||||
This more complex example demonstrates how to deploy to several environments based on the branch, in a `app` namespace
|
||||
|
||||
pipeline:
|
||||
deploy-staging:
|
||||
image: quay.io/honestbee/drone-kubernetes
|
||||
kubernetes_server: ${KUBERNETES_SERVER_STAGING}
|
||||
kubernetes_token: ${KUBERNETES_TOKEN_STAGING}
|
||||
deployment: my-deployment
|
||||
repo: myorg/myrepo
|
||||
container: my-container
|
||||
namespace: app
|
||||
tag: ${DRONE_COMMIT_SHA:8}
|
||||
when:
|
||||
branch: [ staging ]
|
||||
|
||||
deploy-prod:
|
||||
image: quay.io/honestbee/drone-kubernetes
|
||||
kubernetes_server: ${KUBERNETES_SERVER_PROD}
|
||||
kubernetes_token: ${KUBERNETES_TOKEN_PROD}
|
||||
deployment: my-deployment
|
||||
repo: myorg/myrepo
|
||||
container: my-container
|
||||
namespace: app
|
||||
tag: ${DRONE_COMMIT_SHA:8}
|
||||
when:
|
||||
branch: [ master ]
|
||||
|
||||
## Required secrets
|
||||
|
||||
drone secret add --image=honestbee/drone-kubernetes \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue