forked from reimagined/resolve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
114 lines (107 loc) · 2.85 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
pipeline:
publish-nightly:
when:
event: push
image: reimagined/resolve-docker
pull: true
commands:
- yarn install
- VERSION=$(/scripts/prepare_downstream)
- /scripts/npm_patch_rc
- npx oao all "/scripts/package_json patch-dependencies resolve $VERSION && /scripts/npm_publish $VERSION nightly"
secrets: [ npm_registry, npm_token ]
register-build:
when:
event: push
image: reimagined/drone-downstream-registry
pull: true
registry_path: /data/registry
action: package-build
server: http://ci.resolve.sh
params: .downstream
secrets: [ secret_server_token ]
volumes:
- /srv/ecs/downstream-registry:/data/registry
repositories:
- DevExpress/okrserver
- DevExpress/orgstruct
trigger:
when:
event: push
image: plugins/downstream
server: http://ci.resolve.sh
fork: true
wait: true
secrets: [ downstream_token ]
params:
- .downstream
repositories:
- DevExpress/okrserver@build
- DevExpress/orgstruct@build
npm-tag:
when:
event: deployment
environment: downstream-success
image: reimagined/resolve-docker
pull: true
commands:
- /scripts/npm_patch_rc
- npx oao all "/scripts/npm_tag $REGISTRY_VERSION latest-stable"
secrets: [ npm_registry, npm_token ]
notify-downstream-success:
when:
event: deployment
environment: downstream-success
image: plugins/webhook
secrets: [ webhook_urls ]
content_type: application/json
template: '{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"summary": "
{{#success build.status}}
{{build.number}} succeeded.
{{else}}
{{build.number}} failed.
{{/success}}
",
"themeColor": "#00C853",
"title": "{{repo.owner}}/{{repo.name}}: downstream builds are SUCCEEDED",
"potentialAction": [{
"@type": "OpenUri",
"name": "View in CI",
"targets": [{
"os": "default",
"uri": "{{build.link}}"
}]
}]
}'
notify-downstream-failure:
when:
event: deployment
environment: downstream-failure
image: plugins/webhook
secrets: [ webhook_urls ]
content_type: application/json
template: '{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"summary": "
{{#success build.status}}
{{build.number}} succeeded.
{{else}}
{{build.number}} failed.
{{/success}}
",
"themeColor": "#D80000",
"title": "{{repo.owner}}/{{repo.name}}: downstream builds are FAILED",
"potentialAction": [{
"@type": "OpenUri",
"name": "View in CI",
"targets": [{
"os": "default",
"uri": "{{build.link}}"
}]
}]
}'
branches: dev