-
Notifications
You must be signed in to change notification settings - Fork 35
/
.drone.yml
111 lines (93 loc) · 2.02 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
---
kind: pipeline
name: default
clone:
disable: true
workspace:
base: /workspace
path: src/github.com/bitpoke/wordpress-operator
steps:
- name: git
pull: default
image: plugins/git
settings:
depth: 0
tags: true
- name: install dependencies
pull: always
image: docker.io/bitpoke/build:v0.8.3
commands:
- make -j4 build.tools
- name: verify generated code
image: docker.io/bitpoke/build:v0.8.3
commands:
- make generate
- git diff --exit-code
- name: lint
image: docker.io/bitpoke/build:v0.8.3
commands:
- make -j4 lint
- name: test
image: docker.io/bitpoke/build:v0.8.3
commands:
- make test
- name: build
image: docker.io/bitpoke/build:v0.8.3
commands:
- make -j4 build
services:
- name: docker
image: docker:20.10.8-dind-rootless
environment:
DOCKER_TLS_CERTDIR: ""
trigger:
ref:
- refs/pull/**
- refs/heads/master
- refs/heads/release-*
# CI related changes SHOULD be prefixed with drone-
- refs/heads/drone-*
---
kind: pipeline
name: publish
trigger:
ref:
- refs/tags/**
clone:
disable: true
workspace:
base: /workspace
path: src/github.com/bitpoke/wordpress-operator
steps:
- name: git
image: plugins/git
settings:
depth: 0
tags: true
- name: build
image: docker.io/bitpoke/build:v0.8.3
commands:
- make -j4 build
- name: publish
image: docker.io/bitpoke/build:v0.8.3
environment:
DOCKER_REGISTRY: docker.io/bitpoke
DOCKER_USERNAME: bitpokebot
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
SSH_KEY:
from_secret: SSH_KEY
# make build system happy by setting a branch name on tags
BRANCH_NAME: release-${DRONE_TAG}
commands:
- /usr/local/bin/setup-credentials-helper.sh
- git config --global user.email "[email protected]"
- git config --global user.name "Bitpoke Bot"
- git config --global push.default current
- ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts
- make publish
services:
- name: docker
image: docker:20.10.8-dind-rootless
environment:
DOCKER_TLS_CERTDIR: ""