forked from siderolabs/pkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
121 lines (110 loc) · 2.42 KB
/
.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
---
kind: secret
name: kubeconfig
get:
path: buildx
name: kubeconfig
---
kind: pipeline
name: default
services:
- name: docker
image: docker:19.03.3-dind
entrypoint:
- dockerd
command:
- --dns=8.8.8.8
- --dns=8.8.4.4
- --mtu=1440
- --log-level=error
privileged: true
volumes:
- name: docker-socket
path: /var/run
steps:
- name: setup-ci
image: autonomy/build-container:latest
commands:
- git fetch --tags
- apk add coreutils
- echo -e "$BUILDX_KUBECONFIG" > /root/.kube/config
- docker buildx create --driver kubernetes --driver-opt replicas=2 --driver-opt namespace=ci --driver-opt image=moby/buildkit:v0.6.2 --name ci --buildkitd-flags="--allow-insecure-entitlement security.insecure" --use
- docker buildx inspect --bootstrap
environment:
BUILDX_KUBECONFIG:
from_secret: kubeconfig
privileged: true
volumes:
- name: docker-socket
path: /var/run
- name: docker
path: /root/.docker/buildx
- name: kube
path: /root/.kube
- name: build-pull-request
image: autonomy/build-container:latest
pull: always
commands:
- make
when:
event:
include:
- pull_request
volumes:
- name: docker-socket
path: /var/run
- name: docker
path: /root/.docker/buildx
- name: kube
path: /root/.kube
- name: build-and-publish
image: autonomy/build-container:latest
pull: always
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
commands:
- docker login --username "$${DOCKER_USERNAME}" --password "$${DOCKER_PASSWORD}"
- make PUSH=true
when:
event:
exclude:
- pull_request
volumes:
- name: docker-socket
path: /var/run
- name: docker
path: /root/.docker/buildx
- name: kube
path: /root/.kube
volumes:
- name: docker-socket
temp: {}
- name: docker
temp: {}
- name: kube
temp: {}
---
kind: pipeline
name: notify
clone:
disable: true
steps:
- name: slack
image: plugins/slack
settings:
webhook:
from_secret: slack_webhook
channel: proj-talos-maintainers
when:
status:
- success
- failure
trigger:
status:
- success
- failure
depends_on:
- default