-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.drone.yml
75 lines (70 loc) · 2.08 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
workspace:
base: /go
path: src/github.com/udistrital/${DRONE_REPO##udistrital/}
when:
branch: [master, test]
event: [push, pull_request]
pipeline:
# grunt-sonar-runner:
# image: timbru31/java-node
# commands:
# - npm install -g grunt-cli bower
# - npm install grunt --save-dev
# - npm install grunt-sonar-runner --save-dev
# - grunt sonarRunner:analysis
# when:
# branch: [dev]
# event: push
# build and test the go program
nodejs:
image: node:16.15.1
commands:
- npm install -g grunt-cli bower
- npm install natives
- npm install
- bower install --allow-root
- grunt build
when:
branch: [master, test, feature/*]
event: [push, pull_request]
# upload files to bucket s3 cliente-test
publish_s3_test:
image: plugins/s3
secrets: [ aws_access_key_id, aws_secret_access_key ]
region: "us-east-1"
bucket: "cliente-pruebas"
source: dist/**/*
target: /${DRONE_REPO_NAME}
strip_prefix: dist/
when:
branch: test
event: [push, pull_request]
# upload files to bucket s3 cliente-prod
publish_s3_prod:
image: plugins/s3
secrets: [ aws_access_key_id, aws_secret_access_key ]
region: "us-east-1"
bucket: "cliente-prod"
source: dist/**/*
target: /${DRONE_REPO_NAME}
strip_prefix: dist/
when:
branch: master
event: [push, pull_request]
#Notify results to telegram
notify_telegram:
image: appleboy/drone-telegram
secrets: [ telegram_token, telegram_to ]
format: html
message: >
{{#success build.status}}
<code>{{repo.owner}}/{{repo.name}}</code> <a href="{{build.link}}">SUCCESS</a>
<code>{{commit.branch}}</code>@<a href="{{commit.link}}">{{truncate commit.sha 7}}</a>
{{else}}
<code>{{repo.owner}}/{{repo.name}}</code> <a href="{{build.link}}">FAILURE</a>
<code>{{commit.branch}}</code>@<a href="{{commit.link}}">{{truncate commit.sha 7}}</a>
{{/success}}
when:
status: [success, failure]
branch: [master, test]
event: [push, pull_request]