forked from hpreston/cicd_demoapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
49 lines (44 loc) · 1.37 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
build:
image: python:2
commands:
- env
- curl https://api.ciscospark.com/v1/messages -X POST -H "Authorization:Bearer $$SPARK_TOKEN" --data "roomId=$$SPARK_ROOM" --data "text=Drone kicking off build $CI_BUILD_NUMBER"
publish:
docker:
repo: securenetwrk/cicd_demoapp
tag: latest
username: $$DOCKER_USERNAME
password: $$DOCKER_PASSWORD
email: $$DOCKER_EMAIL
deploy:
webhook:
image: plugins/drone-webhook
skip_verify: true
method: POST
auth:
username: $$MANTL_USERNAME
password: $$MANTL_PASSWORD
urls:
- https://$$MANTL_CONTROL/marathon/v2/apps/class/erthiel/restart?force=true
notify:
webhook:
debug: true
image: plugins/drone-webhook
when:
success: true
failure: true
method: POST
header:
Content-type: application/json; charset=utf-8
Authorization: Bearer $$SPARK_TOKEN
urls:
- https://api.ciscospark.com/v1/messages
template: |
{
"roomId": "$$SPARK_ROOM",
{{#success build.status}}
"text": "Drone confirms {{repo.full_name}} build {{build.number}} completed successfully.\nhttp://github.com/{{repo.full_name}}/commit/{{build.commit}}."
{{else}}
"text": "Drone blames {{build.author}} for breaking build {{build.number}}.\nhttp://github.com/{{repo.full_name}}/commit/{{build.commit}}."
{{/success}}
}