This repository has been archived by the owner on Apr 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.drone.yml
101 lines (98 loc) · 2.24 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
---
kind: pipeline
type: kubernetes
name: Discover Velocity releases
trigger:
event:
exclude:
- promote
steps:
- name: Build
image: golang:1.18.2-alpine
commands:
- go build -o bin/discover github.com/dockcenter/velocity/cmd/discover
- name: Discover releases
image: alpine
when:
event:
- cron
- push
branch:
- main
environment:
DRONE_SERVER: http://drone
DRONE_TOKEN:
from_secret: drone_token
commands:
- apk --no-cache add curl tar
- curl -L https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar zx
- install -t /usr/local/bin drone
- bin/discover
- sh scripts/promote.sh
- name: Discover releases (dry run)
image: alpine
when:
event:
exclude:
- cron
branch:
exclude:
- main
environment:
DRONE_SERVER: http://drone
DRONE_TOKEN:
from_secret: drone_token
DRY_RUN: true
commands:
- apk --no-cache add curl tar
- curl -L https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar zx
- install -t /usr/local/bin drone
- bin/discover
- sh scripts/promote.sh
---
kind: pipeline
type: kubernetes
name: Publish
trigger:
event:
- promote
steps:
- name: Download velocity
image: alpine
commands:
- apk add --no-cache wget
- wget -P velocity/ $DOWNLOAD_URL
- name: Build Docker image
image: plugins/docker
when:
target:
- development
settings:
dockerfile: Dockerfile
dry_run: true
repo: dockcenter/velocity
tags: ${DOCKER_TAGS}
username:
from_secret: docker_username
password:
from_secret: docker_password
mtu: 1440
- name: Publish Docker image
image: plugins/docker
when:
target:
exclude:
- development
settings:
dockerfile: Dockerfile
repo: dockcenter/velocity
tags: ${DOCKER_TAGS}
username:
from_secret: docker_username
password:
from_secret: docker_password
mtu: 1440
---
kind: signature
hmac: 0c2f0f7e56011d7a5b12e6d2c63b506935238c592865be2ad79d8f0563d0fbaf
...