-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
70 lines (61 loc) · 1.65 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
---
kind: pipeline
type: ssh
name: Deployment
server:
host: exp1.local
user: drone
ssh_key:
from_secret: id_ed25519-drone
trigger:
branch:
- main
clone:
disable: true
# Docs - Environment Reference
# https://docs.drone.io/pipeline/environment/reference/
steps:
- name: clone
commands:
- git clone git@github.com:${DRONE_REPO} .
- name: check
commands:
- echo "Skipped."
- name: copy
commands:
- sudo rsync -av --exclude='.git/' . /etc/blackbox-exporter/
- sudo chown --recursive nobody:root /etc/blackbox-exporter/
- name: reload
commands:
- sudo docker kill --signal=SIGHUP blackbox_exporter
---
kind: pipeline
type: docker
name: Notification
clone:
disable: true
# Passing status of depended pipelines.
depends_on: [ Deployment ]
trigger:
status: [ success, failure ]
globals:
- &common_template |
<${DRONE_REPO_LINK}|${DRONE_REPO}>
Commit: <${DRONE_COMMIT_LINK}|{{ truncate build.commit 8 }}> by ${DRONE_COMMIT_AUTHOR}
{{#if $DRONE_PULL_REQUEST}}
<https://github.com/{{ repo.owner }}/{{ repo.name }}/pull/${DRONE_PULL_REQUEST}|Pull Request: #${DRONE_PULL_REQUEST}>
{{/if}}
Pipeline Result: <http://web1.local:8080/${DRONE_REPO}/{{ build.number }}|#{{ build.number }}> (type: `{{ build.event }}`)
# Docs - Environment Reference
# https://docs.drone.io/pipeline/environment/reference/
steps:
- name: slack
image: plugins/slack-blame
settings:
channel: notifications
token:
from_secret: slack_bot_oauth_token
mapping:
myGithubUsername: mySlackDisplayName
success_template: *common_template
failure_template: *common_template