This commit is contained in:
parent
7873f802c7
commit
e10306402a
52
.drone.yml
Normal file
52
.drone.yml
Normal file
@ -0,0 +1,52 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: default
|
||||
|
||||
metadata:
|
||||
labels:
|
||||
pod-security.kubernetes.io/audit: privileged
|
||||
|
||||
services:
|
||||
- name: docker daemon
|
||||
image: docker:dind
|
||||
privileged: true
|
||||
environment:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
# when:
|
||||
# event:
|
||||
# - tag
|
||||
# - promote
|
||||
|
||||
steps:
|
||||
- name: node.js build
|
||||
image: node:18
|
||||
commands:
|
||||
- "npm add --global pnpm"
|
||||
- pnpm i
|
||||
- pnpm run build
|
||||
|
||||
- name: container build
|
||||
image: docker:latest
|
||||
privileged: true
|
||||
commands:
|
||||
- "while ! docker stats --no-stream; do sleep 1; done"
|
||||
- "docker build -t $DOCKER_REGISTRY/glmdev/mathy-api ."
|
||||
- "docker push $DOCKER_REGISTRY/glmdev/mathy-api"
|
||||
environment:
|
||||
DOCKER_HOST: tcp://localhost:2375
|
||||
DOCKER_REGISTRY:
|
||||
from_secret: DOCKER_REGISTRY
|
||||
# when:
|
||||
# event:
|
||||
# - tag
|
||||
# - promote
|
||||
|
||||
- name: k8s rollout
|
||||
image: bitnami/kubectl
|
||||
commands:
|
||||
- kubectl rollout -n mathy restart deployment/mathy-api
|
||||
# when:
|
||||
# event:
|
||||
# - tag
|
||||
# - promote
|
Loading…
Reference in New Issue
Block a user