forked from bugsnag/bugsnag-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline.yml
166 lines (151 loc) · 4.65 KB
/
pipeline.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
steps:
#
# License audit
#
- label: ':copyright: License Audit'
timeout_in_minutes: 20
agents:
queue: opensource-mac-cocoa-11
command: scripts/license_finder.sh
#
# Android builder base - used by React Native and React Native CLI
#
- label: ':docker: Build Android Builder base image'
key: 'android-builder-base'
timeout_in_minutes: 30
plugins:
- docker-compose#v3.3.0:
build: android-builder-base
image-repository: 855461928731.dkr.ecr.us-west-1.amazonaws.com/js
cache-from: android-builder-base:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:android-builder-base
- docker-compose#v3.3.0:
push: android-builder-base:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:android-builder-base
#
# Publish/package notifier
#
- label: ':docker: Prepare package.json'
if: build.env("RN_INTEGRATION") != null
key: 'package-js'
timeout_in_minutes: 3
plugins:
- docker-compose#v3.7.0:
run: minimal-packager
artifact_paths: min_packages.tar
- label: ':docker: Build and publish JS packages'
key: 'publish-js'
timeout_in_minutes: 30
plugins:
- docker-compose#v3.3.0:
build: publisher
image-repository: 855461928731.dkr.ecr.us-west-1.amazonaws.com/js
env:
RN_INTEGRATION: ${RN_INTEGRATION}
#
# Trigger individual pipelines
#
- label: 'Trigger Browser pipeline'
if: build.env("RN_INTEGRATION") == null
depends_on: 'package-js'
trigger: 'bugsnag-js-browser'
build:
branch: '${BUILDKITE_BRANCH}'
commit: '${BUILDKITE_COMMIT}'
message: '${BUILDKITE_MESSAGE}'
async: true
- label: 'Trigger Node pipeline'
if: build.env("RN_INTEGRATION") == null
depends_on: 'package-js'
trigger: 'bugsnag-js-node'
build:
branch: '${BUILDKITE_BRANCH}'
commit: '${BUILDKITE_COMMIT}'
message: '${BUILDKITE_MESSAGE}'
async: true
- label: 'Trigger Expo pipeline'
if: build.env("RN_INTEGRATION") == null
depends_on: 'publish-js'
trigger: 'bugsnag-js-expo'
build:
branch: '${BUILDKITE_BRANCH}'
commit: '${BUILDKITE_COMMIT}'
message: '${BUILDKITE_MESSAGE}'
async: true
- label: 'Trigger React Native pipeline'
depends_on:
- 'publish-js'
- 'android-builder-base'
trigger: 'bugsnag-js-react-native'
build:
branch: '${BUILDKITE_BRANCH}'
commit: '${BUILDKITE_COMMIT}'
message: '${BUILDKITE_MESSAGE}'
async: true
- label: 'Trigger React Native CLI pipeline'
if: build.env("RN_INTEGRATION") == null
depends_on:
- 'publish-js'
- 'android-builder-base'
trigger: 'bugsnag-js-react-native-cli'
build:
branch: '${BUILDKITE_BRANCH}'
commit: '${BUILDKITE_COMMIT}'
message: '${BUILDKITE_MESSAGE}'
async: true
- label: ':aws-lambda: AWS Lambda tests'
if: build.env("RN_INTEGRATION") == null
timeout_in_minutes: 35
agents:
queue: 'opensource-mac-aws-sam'
commands:
# force the NPM registry as the default on CI is artifactory, which can't
# currently install from our lockfile
- npm ci --registry https://registry.npmjs.org
- cd test/aws-lambda
- bundle install
- bundle exec maze-runner
#
# Core tests and checks
#
- label: ':docker: Build CI image'
if: build.env("RN_INTEGRATION") == null
key: 'ci-image'
depends_on: 'package-js'
timeout_in_minutes: 20
plugins:
- artifacts#v1.2.0:
download: min_packages.tar
- docker-compose#v3.7.0:
build:
- ci
image-repository: 855461928731.dkr.ecr.us-west-1.amazonaws.com/js
cache-from:
- ci:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-base-${BRANCH_NAME}
- ci:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-base
- docker-compose#v3.7.0:
push:
- ci:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-base-${BRANCH_NAME}
- ci:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-base
- label: 'Lint'
if: build.env("RN_INTEGRATION") == null
depends_on: 'ci-image'
timeout_in_minutes: 10
plugins:
docker-compose#v3.7.0:
run: ci
command: 'npm run test:lint'
- label: 'Unit tests'
if: build.env("RN_INTEGRATION") == null
depends_on: 'ci-image'
timeout_in_minutes: 10
plugins:
docker-compose#v3.7.0:
run: ci
command: 'npm run test:unit'
- label: 'Type checks/tests'
if: build.env("RN_INTEGRATION") == null
depends_on: 'ci-image'
timeout_in_minutes: 10
plugins:
docker-compose#v3.7.0:
run: ci
command: 'npm run test:types'