proper-website-p2p-api/.drone.yml

58 lines
1.2 KiB
YAML

kind: pipeline
type: kubernetes
name: default
trigger:
event:
- push
steps:
- name: build
image: golang:1.18.0-alpine
volumes:
- name: builder
path: /drone/src/build
commands:
- apk --no-cache add git
- go build -o ./build/app ./src
- name: docker
image: plugins/docker
privileged: true
volumes:
- name: builder
path: /drone/src/build
settings:
cache_from:
- "dutchellie/proper-website-p2p-api:latest"
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: dutchellie/proper-website-p2p-api
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
- name: deploy
image: pelotech/drone-helm3
settings:
mode: upgrade
chart: .drone/helm/api
namespace: drone-production
release: quenten-p2p-api-prod
skip_tls_verify: true
values_files:
- .drone/helm/prod-val.yaml
values:
- "image.image=dutchellie/proper-website-p2p-api:${DRONE_COMMIT_SHA:0:8}"
kube_api_server:
from_secret: prod_api_server
kube_token:
from_secret: prod_kube_token
kube_certificate:
from_secret: prod_kube_certificate
kube_service_account: drone-deploy
dry_run: false
volumes:
- name: builder
temp: {}