This repository has been archived on 2026-03-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
www/.drone.yml

55 lines
1.1 KiB
YAML
Raw Normal View History

2022-11-28 23:37:37 -06:00
---
kind: pipeline
type: kubernetes
name: default
2022-11-29 00:17:50 -06:00
metadata:
labels:
pod-security.kubernetes.io/audit: privileged
services:
- name: docker daemon
image: docker:dind
2022-11-29 00:50:43 -06:00
privileged: true
2022-11-29 01:01:27 -06:00
environment:
DOCKER_TLS_CERTDIR: ""
when:
event:
- tag
- promote
2022-11-28 23:37:37 -06:00
steps:
2022-11-28 23:53:38 -06:00
- name: node.js build
2022-11-28 23:37:37 -06:00
image: node:18
commands:
2022-11-28 23:48:00 -06:00
- "npm add --global pnpm"
- pnpm i --no-frozen-lockfile
2022-11-28 23:37:37 -06:00
- pnpm run build
2022-11-28 23:53:38 -06:00
2022-11-29 00:01:20 -06:00
- name: container build
image: docker:latest
2022-11-29 00:50:43 -06:00
privileged: true
2022-11-28 23:53:38 -06:00
commands:
- "while ! docker stats --no-stream; do sleep 1; done"
- "docker build -t $DOCKER_REGISTRY/garrettmills/www ."
- "docker push $DOCKER_REGISTRY/garrettmills/www"
2022-11-28 23:53:38 -06:00
environment:
2022-11-29 01:02:20 -06:00
DOCKER_HOST: tcp://localhost:2375
2022-11-28 23:53:38 -06:00
DOCKER_REGISTRY:
from_secret: DOCKER_REGISTRY
when:
event:
- tag
- promote
2022-11-29 01:09:46 -06:00
- name: k8s rollout
image: bitnami/kubectl
2022-11-29 01:12:20 -06:00
privileged: true
2022-11-29 01:09:46 -06:00
commands:
- cd deploy && kubectl apply -f .
2022-11-29 02:29:03 -06:00
- kubectl rollout restart deployment/garrettmills-dev -n default
when:
event:
- tag
- promote