-
Notifications
You must be signed in to change notification settings - Fork 75
/
.drone.yml
72 lines (66 loc) · 1.66 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
---
kind: pipeline
name: "master"
steps:
- name: test
image: ruby:2.6.1
commands:
- gem update bundler
- bundle install
- bundle exec rspec
- name: "Bump and tag"
image: ruby:2.6.1
environment:
BOT_USERNAME: kite-bot
BOT_NAME: Kite Bot
BOT_EMAIL: kite-bot@heliostech.fr
GITHUB_API_KEY:
from_secret: kite_bot_key
commands:
- gem install bump
- git config --global user.name " Kite Bot"
- git config --global user.email "kite-bot@heliostech.fr"
- git remote add authenticated-origin https://kite-bot:$GITHUB_API_KEY@github.com/${DRONE_REPO}
- git fetch authenticated-origin
- bump patch --commit-message 'Bump [ci skip]'
- git tag $(cat VERSION)
- git push authenticated-origin master
- git push --tags authenticated-origin
- git describe --tags $(git rev-list --tags --max-count=1) > .tags
when:
event:
- push
branch:
- master
- name: "Docker build and push"
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: rubykube/arke
when:
event:
- push
branch:
- master
- name: "Notify in slack"
image: plugins/slack
settings:
webhook:
from_secret: slack_webhook
channel:
from_secret: slack_channel
template: >
{{#success build.status}}
[SUCCESS] Arke {{ build.branch }} branch build by {{ build.author }} has succeeded! :sunglasses:
{{else}}
[FAILURE] Branch {{ build.branch }} by {{ build.author }} has failed! :pepe:
{{/success}}
Check the build info here: {{ build.link }}
when:
status: [success, failure]
trigger:
event:
- push