-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
24 lines (22 loc) · 877 Bytes
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
kind: pipeline
type: kubernetes
name: default
steps:
- name: Build image
image: plugins/docker
settings:
username: "viktorbarzin"
password:
from_secret: dockerhub_password
repo: viktorbarzin/webhook-handler
dockerfile: Dockerfile
auto_tag: true
- name: Update deployment
image: alpine
commands:
- "apk add curl"
- "curl -X PATCH https://kubernetes:6443/apis/apps/v1/namespaces/webhook-handler/deployments/webhook-handler -H \"Authorization:Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)\" -H \"Content-Type:application/strategic-merge-patch+json\" -k -d '{\"spec\": {\"template\": {\"metadata\": { \"annotations\": {\"kubectl.kubernetes.io/restartedAt\": \"'$(date +%Y-%m-%dT%TZ)'\" }}}}}' | head"
---
kind: secret
name: dockerhub_password
data: 6zDo7MyxHNVEHnkvDRiMaGm8TjqLfEpeMEll+AEtO8/I+R9vCiY9V/XdTmtwpfGV