Update the production pipeline too
continuous-integration/drone/push Build is passing Details

This commit is contained in:
DutchEllie 2022-05-14 21:22:11 +02:00
parent b06ec9b955
commit d489dd744c
Signed by: DutchEllie
SSH Key Fingerprint: SHA256:dKq6ZSgN5E3Viqrw/+xAdf2VdR6hdRGNyrYqXXwfjTY
1 changed files with 41 additions and 6 deletions

View File

@ -79,7 +79,7 @@ volumes:
kind: pipeline kind: pipeline
type: kubernetes type: kubernetes
name: deploy-prod name: production
trigger: trigger:
event: event:
@ -87,18 +87,48 @@ trigger:
target: target:
- production - production
# PRODUCTION!!!!
steps: steps:
- name: docker - name: build-wasm
image: golang:1.17.8-alpine
volumes:
- name: build
path: /drone/src/build
environment:
APIURL: https://api.quenten.nl/api
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
path: /drone/src/build
environment:
APIURL: https://api.quenten.nl/api
commands:
- go build -o ./build/app -ldflags="-X 'main.ApiURL=$APIURL'" ./src
- name: build-publish-image
image: plugins/docker image: plugins/docker
privileged: true
volumes:
- name: build
path: /drone/src/build
settings: settings:
username: cache_from:
- "dutchellie/proper-website-2:latest"
username:
from_secret: docker_username from_secret: docker_username
password: password:
from_secret: docker_password from_secret: docker_password
dockerfile: Dockerfile
repo: dutchellie/proper-website-2 repo: dutchellie/proper-website-2
tags: tags:
- latest - latest
- ${DRONE_COMMIT_SHA:0:8} - ${DRONE_COMMIT_SHA:0:8}
depends_on:
- build-wasm
- build-server
- name: deploy-production - name: deploy-production
image: pelotech/drone-helm3 image: pelotech/drone-helm3
settings: settings:
@ -108,7 +138,6 @@ steps:
release: newsite-production release: newsite-production
skip_tls_verify: true skip_tls_verify: true
values_files: values_files:
# - .drone/helm/values.yaml
- .drone/helm/prod-val.yaml - .drone/helm/prod-val.yaml
values: values:
- "image=dutchellie/proper-website-2:${DRONE_COMMIT_SHA:0:8}" - "image=dutchellie/proper-website-2:${DRONE_COMMIT_SHA:0:8}"
@ -120,3 +149,9 @@ steps:
from_secret: prod_kube_certificate from_secret: prod_kube_certificate
kube_service_account: drone-deploy kube_service_account: drone-deploy
dry_run: false dry_run: false
depends_on:
- build-publish-image
volumes:
- name: build
temp: {}