-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
119 lines (109 loc) · 2.22 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
#workspace:
# base: /lama
# path: src/github.com/michigg/lama
kind: pipeline
type: docker
name: default
platform:
os: linux
arch: amd64
steps:
- name: fetch
image: alpine/git
commands:
- git fetch --tags
- name: build
privileged: true
image: docker/compose:1.24.1
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- docker-compose -f docker-compose.test.yml build --no-cache
depends_on:
- fetch
- name: test
image: docker/compose:1.24.1
privileged: true
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- echo "-------- docker-compose down --------"
- docker-compose -f docker-compose.test.yml down
- echo "-------- docker-compose up -d --------"
- docker-compose -f docker-compose.test.yml up -d
- echo "-------- docker-compose ps --------"
- docker-compose -f docker-compose.test.yml ps
- echo "-------- docker-compose test --------"
- docker-compose -f docker-compose.test.yml run ci_lama /lama/entrypoint.sh
- docker-compose -f docker-compose.test.yml down
depends_on:
- fetch
- build
- name: publish_dockerhub
image: plugins/docker
when:
event: tag
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: michigg/lama
tags:
- latest
- ${DRONE_TAG}
depends_on:
- fetch
- build
- test
- name: publish_github
image: plugins/github-release
settings:
api_key:
from_secret: github_release_token
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
when:
event: tag
depends_on:
- fetch
- build
- test
- name: send telegram notification
image: appleboy/drone-telegram
when:
status:
- success
- failure
settings:
token:
from_secret: telegram_token
to:
from_secret: telegram_chat_id
message: >
{{#success build.status}}
build {{build.number}} succeeded. Good job.
{{else}}
build {{build.number}} failed. Fix me please.
{{/success}}
depends_on:
- fetch
- build
- test
- publish_dockerhub
- publish_github
trigger:
event:
- push
- tag
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock