Update .drone
This commit is contained in:
parent
4b32e554dc
commit
8730911a5d
91
.drone.yml
91
.drone.yml
|
@ -5,6 +5,8 @@ name: staging
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
|
||||||
# STAGING!!!!
|
# STAGING!!!!
|
||||||
steps:
|
steps:
|
||||||
|
@ -61,6 +63,8 @@ steps:
|
||||||
- .drone/helm/staging-val.yaml
|
- .drone/helm/staging-val.yaml
|
||||||
values:
|
values:
|
||||||
- "image=dutchellie/proper-website-2:dev-${DRONE_COMMIT_SHA:0:8}"
|
- "image=dutchellie/proper-website-2:dev-${DRONE_COMMIT_SHA:0:8}"
|
||||||
|
- "baseURL=staging.quenten.nl"
|
||||||
|
- "name=newsite-staging"
|
||||||
kube_api_server:
|
kube_api_server:
|
||||||
from_secret: staging_api_server
|
from_secret: staging_api_server
|
||||||
kube_token:
|
kube_token:
|
||||||
|
@ -87,6 +91,8 @@ trigger:
|
||||||
- promote
|
- promote
|
||||||
target:
|
target:
|
||||||
- production
|
- production
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
|
||||||
# PRODUCTION!!!!
|
# PRODUCTION!!!!
|
||||||
steps:
|
steps:
|
||||||
|
@ -143,6 +149,8 @@ steps:
|
||||||
- .drone/helm/prod-val.yaml
|
- .drone/helm/prod-val.yaml
|
||||||
values:
|
values:
|
||||||
- "image=dutchellie/proper-website-2:latest-${DRONE_COMMIT_SHA:0:8}"
|
- "image=dutchellie/proper-website-2:latest-${DRONE_COMMIT_SHA:0:8}"
|
||||||
|
- "baseURL=quenten.nl"
|
||||||
|
- "name=newsite-prod"
|
||||||
kube_api_server:
|
kube_api_server:
|
||||||
from_secret: prod_api_server
|
from_secret: prod_api_server
|
||||||
kube_token:
|
kube_token:
|
||||||
|
@ -157,3 +165,86 @@ steps:
|
||||||
volumes:
|
volumes:
|
||||||
- name: build
|
- name: build
|
||||||
temp: {}
|
temp: {}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: feature-branch
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
branch:
|
||||||
|
exclude:
|
||||||
|
- main
|
||||||
|
|
||||||
|
# FEATURE DEPLOY
|
||||||
|
steps:
|
||||||
|
- name: build-wasm
|
||||||
|
image: golang:1.17.8-alpine
|
||||||
|
volumes:
|
||||||
|
- name: build-feature
|
||||||
|
path: /drone/src/build
|
||||||
|
environment:
|
||||||
|
APIURL: https://api.quenten.nl/api/testing
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
commands:
|
||||||
|
- mkdir ./build/web
|
||||||
|
- GOARCH=wasm GOOS=js go build -o ./build/web/app.wasm -ldflags="-X 'main.ApiURL=$APIURL'" ./src
|
||||||
|
- name: build-server
|
||||||
|
image: golang:1.17.8-alpine
|
||||||
|
volumes:
|
||||||
|
- name: build-feature
|
||||||
|
path: /drone/src/build
|
||||||
|
environment:
|
||||||
|
APIURL: https://api.quenten.nl/api/testing
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
commands:
|
||||||
|
- go build -o ./build/app -ldflags="-X 'main.ApiURL=$APIURL'" ./src
|
||||||
|
- name: build-publish-image
|
||||||
|
image: plugins/docker
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: build-feature
|
||||||
|
path: /drone/src/build
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
repo: dutchellie/proper-website-2
|
||||||
|
tags:
|
||||||
|
- feature-${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}
|
||||||
|
depends_on:
|
||||||
|
- build-wasm
|
||||||
|
- build-server
|
||||||
|
- name: deploy-staging
|
||||||
|
image: pelotech/drone-helm3
|
||||||
|
settings:
|
||||||
|
mode: upgrade
|
||||||
|
chart: .drone/helm/chart
|
||||||
|
namespace: drone-staging
|
||||||
|
release: feature-${DRONE_BRANCH}
|
||||||
|
skip_tls_verify: true
|
||||||
|
values_files:
|
||||||
|
- .drone/helm/staging-val.yaml
|
||||||
|
values:
|
||||||
|
- "image=dutchellie/proper-website-2:feature-${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}"
|
||||||
|
- "baseURL=${DRONE_BRANCH}.quenten.nl"
|
||||||
|
- "name=${DRONE_BRANCH}-deployment"
|
||||||
|
kube_api_server:
|
||||||
|
from_secret: staging_api_server
|
||||||
|
kube_token:
|
||||||
|
from_secret: staging_kube_token
|
||||||
|
kube_certificate:
|
||||||
|
from_secret: staging_kube_certificate
|
||||||
|
kube_service_account: drone-deploy
|
||||||
|
dry_run: false
|
||||||
|
depends_on:
|
||||||
|
- build-publish-image
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: build-feature
|
||||||
|
temp: {}
|
Loading…
Reference in New Issue