Add staging pipeline

This commit is contained in:
DutchEllie 2022-07-13 12:45:48 +02:00
parent 2cbc24f293
commit 2d79eed598
Signed by: DutchEllie
SSH Key Fingerprint: SHA256:dKq6ZSgN5E3Viqrw/+xAdf2VdR6hdRGNyrYqXXwfjTY
2 changed files with 61 additions and 1 deletions

View File

@ -58,6 +58,66 @@ volumes:
---
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: 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-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: {}
---
kind: pipeline
type: kubernetes
name: deploy
@ -68,6 +128,7 @@ trigger:
branch:
exclude:
- main
- staging
steps:
- name: build-publish-image

View File

@ -1,6 +1,5 @@
baseURL: changemestaging.dutchellie.nl
name: changeme-staging
replicas: 2
containerEnv:
# - name: APIURL
# value: https://api.quenten.nl/api/testing