svelte-website/.drone.yml

179 lines
4.0 KiB
YAML
Raw Normal View History

2022-07-04 17:32:06 +02:00
kind: pipeline
type: kubernetes
name: deploy-production
trigger:
event:
- push
branch:
- main
steps:
- name: build-publish-image
image: plugins/docker
privileged: true
volumes:
- name: build
path: /drone/src/build
settings:
cache_from:
"dutchellie/${DRONE_REPO_NAME}:${DRONE_BRANCH}-latest"
username:
from_secret: org_docker_username
password:
from_secret: org_docker_password
dockerfile: Dockerfile
repo: dutchellie/${DRONE_REPO_NAME}
tags:
- ${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}
- ${DRONE_BRANCH}-latest
- name: deploy
image: pelotech/drone-helm3
settings:
mode: upgrade
chart: .drone/helm/chart
namespace: drone-production
release: ${DRONE_REPO_NAME}-${DRONE_BRANCH}
skip_tls_verify: true
values_files:
- .drone/helm/prod-val.yaml
values:
- "image=dutchellie/${DRONE_REPO_NAME}:${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}"
- "baseURL=quenten.nl"
- "name=${DRONE_REPO_NAME}-${DRONE_BRANCH}"
kube_api_server:
from_secret: org_api_server
kube_token:
from_secret: org_kube_token_production
kube_certificate:
from_secret: org_kube_certificate_production
kube_service_account: drone-deploy
dry_run: false
depends_on:
- build-publish-image
volumes:
- name: build
temp: {}
---
2022-07-13 12:45:48 +02:00
kind: pipeline
type: kubernetes
name: deploy-staging
trigger:
event:
- push
branch:
- staging
steps:
- name: build-publish-image
image: plugins/docker
privileged: true
volumes:
- name: build
path: /drone/src/build
settings:
cache_from:
"dutchellie/${DRONE_REPO_NAME}:${DRONE_BRANCH}-latest"
username:
from_secret: org_docker_username
password:
from_secret: org_docker_password
dockerfile: staging.Dockerfile
2022-07-13 12:45:48 +02:00
repo: dutchellie/${DRONE_REPO_NAME}
tags:
- ${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}
- ${DRONE_BRANCH}-latest
- name: deploy
image: pelotech/drone-helm3
settings:
mode: upgrade
chart: .drone/helm/chart
namespace: drone-staging
release: ${DRONE_REPO_NAME}-${DRONE_BRANCH}
skip_tls_verify: true
values_files:
- .drone/helm/prod-val.yaml
values:
- "image=dutchellie/${DRONE_REPO_NAME}:${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}"
- "baseURL=staging.quenten.nl"
- "name=${DRONE_REPO_NAME}-${DRONE_BRANCH}"
kube_api_server:
from_secret: org_api_server
kube_token:
from_secret: org_kube_token
kube_certificate:
from_secret: org_kube_certificate
kube_service_account: drone-deploy
dry_run: false
depends_on:
- build-publish-image
volumes:
- name: build
temp: {}
---
2022-07-04 17:24:21 +02:00
kind: pipeline
type: kubernetes
name: deploy
trigger:
event:
- push
2022-07-04 17:32:06 +02:00
branch:
exclude:
- main
2022-07-13 12:45:48 +02:00
- staging
2022-07-04 17:24:21 +02:00
steps:
- name: build-publish-image
image: plugins/docker
privileged: true
volumes:
- name: build
path: /drone/src/build
settings:
cache_from:
"dutchellie/${DRONE_REPO_NAME}:${DRONE_BRANCH}-latest"
username:
from_secret: org_docker_username
password:
from_secret: org_docker_password
dockerfile: staging.Dockerfile
2022-07-04 17:24:21 +02:00
repo: dutchellie/${DRONE_REPO_NAME}
tags:
- ${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}
- ${DRONE_BRANCH}-latest
- name: deploy
image: pelotech/drone-helm3
settings:
mode: upgrade
chart: .drone/helm/chart
namespace: drone-staging
release: ${DRONE_REPO_NAME}-${DRONE_BRANCH}
skip_tls_verify: true
values_files:
- .drone/helm/staging-val.yaml
values:
- "image=dutchellie/${DRONE_REPO_NAME}:${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}"
- "baseURL=${DRONE_BRANCH}.${DRONE_REPO_NAME}.ci.dutchellie.nl"
- "name=${DRONE_REPO_NAME}-${DRONE_BRANCH}"
kube_api_server:
from_secret: org_api_server
kube_token:
from_secret: org_kube_token
kube_certificate:
from_secret: org_kube_certificate
kube_service_account: drone-deploy
dry_run: false
depends_on:
- build-publish-image
volumes:
- name: build
temp: {}