-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.drone.yaml
More file actions
72 lines (64 loc) · 1.61 KB
/
.drone.yaml
File metadata and controls
72 lines (64 loc) · 1.61 KB
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
---
kind: pipeline
type: docker
name: Build swarm-cronjob image
concurrency:
limit: 1
clone:
depth: 1
steps:
- name: git clone upstream repo
image: docker:git
commands:
- git clone --recursive https://github.com/crazy-max/swarm-cronjob.git swarm-cronjob
- (cd swarm-cronjob && git checkout $(cat ../VERSION))
- name: modify docker api version string in source
image: bash
commands:
# replace docker API version in source code
- cd swarm-cronjob/internal/docker
- sed -i 's/WithVersion("1.12")/WithVersion("1.24")/g' client.go
- grep -h 'WithVersion' client.go
- name: docker build (${DRONE_BRANCH}-latest)
image: plugins/docker
settings:
context: swarm-cronjob
dockerfile: swarm-cronjob/Dockerfile
mirror: dockerhub.nexus.diesel.net
registry: docker.nexus.diesel.net
username:
from_secret: nexus_user
password:
from_secret: nexus_pass
repo: docker.nexus.diesel.net/swarm-cronjob
tags:
- ${DRONE_BRANCH}-latest
when:
event:
- push
- name: docker build (${DRONE_TAG})
image: plugins/docker
settings:
context: swarm-cronjob
dockerfile: swarm-cronjob/Dockerfile
mirror: dockerhub.nexus.diesel.net
registry: docker.nexus.diesel.net
username:
from_secret: nexus_user
password:
from_secret: nexus_pass
repo: docker.nexus.diesel.net/swarm-cronjob
tags:
- latest
- ${DRONE_TAG}
when:
event:
- tag
trigger:
branch:
- development
- stable
event:
- push
- tag
...