-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbitrise.yml
364 lines (342 loc) · 12 KB
/
bitrise.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
---
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: flutter
pipelines:
unit_test:
stages:
- setup: {}
- build: {}
- test: {}
test-pipeline:
stages:
- stage1: {}
- stage2: {}
stages:
setup:
workflows:
- set-up-environment: {}
build:
workflows:
- android: {}
- ios: {}
test:
workflows:
- flutter-test1: {}
- flutter-test2: {}
- flutter-test3: {}
stage1:
workflows:
- test1: {}
stage2:
should_always_run: true
workflows:
- test2: {}
workflows:
android:
description: |
Builds project and runs tests.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html).
steps:
- file-downloader@1:
title: Key Property File Downloader
inputs:
- destination: "$BITRISE_SOURCE_DIR/android/key.properties"
- file_permission: '644'
- source: "$BITRISEIO_key_property_URL"
- file-downloader@1:
title: Keystore File Downloader
inputs:
- destination: "$BITRISE_SOURCE_DIR/android/app/upload-keystore.jks"
- file_permission: '600'
- source: "$BITRISEIO_ANDROID_KEYSTORE_URL"
- flutter-build@0:
inputs:
- platform: android
- sign-apk@1:
inputs:
- use_apk_signer: 'true'
- virtual-device-testing-for-android@1: {}
- firebase-app-distribution@0: {}
before_run:
- set-up-environment
- flutter-lint-test
after_run:
- finishing-build
android-deploy:
description: |
Builds project and runs tests.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html).
steps:
- file-downloader@1:
title: Key Property File Downloader
inputs:
- destination: "$BITRISE_SOURCE_DIR/android/key.properties"
- file_permission: '644'
- source: "$BITRISEIO_key_property_URL"
- file-downloader@1:
title: Keystore File Downloader
inputs:
- destination: "$BITRISE_SOURCE_DIR/android/app/upload-keystore.jks"
- file_permission: '600'
- source: "$BITRISEIO_ANDROID_KEYSTORE_URL"
- flutter-build@0:
inputs:
- platform: android
- sign-apk@1:
inputs:
- use_apk_signer: 'true'
- virtual-device-testing-for-android@1: {}
- google-play-deploy@3: {}
before_run:
- set-up-environment
- flutter-lint-test
after_run:
- finishing-build
deploy:
description: |
Builds and deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html#deploying-a-flutter-app).
If you build for iOS, make sure to set up code signing secrets on Bitrise for a successful build.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html) for signing and deployment options.
- Check out the [Code signing guide](https://devcenter.bitrise.io/en/code-signing.html) for iOS and Android
steps:
- manage-ios-code-signing@1:
inputs:
- project_path: "$BITRISE_IOS_PROJECT_PATH"
- scheme: "$BITRISE_IOS_SCHEME"
- apple_service_connection: apple-id
- file-downloader@1:
title: Key Property File Downloader
inputs:
- destination: "$BITRISE_SOURCE_DIR/android/key.properties"
- source: "$BITRISEIO_key_property_URL"
- file-downloader@1:
title: Keystore File Downloader
inputs:
- destination: "$BITRISE_SOURCE_DIR/android/app/upload-keystore.jks"
- source: "$BITRISEIO_ANDROID_KEYSTORE_URL"
- flutter-build@0:
inputs:
- project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
- platform: both
- ios_output_type: archive
before_run:
- set-up-environment
after_run:
- finishing-build
device-test:
description: |
Builds project and runs tests.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html).
steps:
- flutter-test@1:
inputs:
- generate_code_coverage_files: 'yes'
- project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
before_run:
- set-up-environment
after_run:
- finishing-build
finishing-build:
description: |
Builds project and runs tests.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html).
steps:
- cache-push@2: {}
- deploy-to-bitrise-io@2: {}
- slack@3:
run-if: false
is_always_run: false
before_run: []
flutter-lint-test:
description: |
Builds and deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html#deploying-a-flutter-app).
If you build for iOS, make sure to set up code signing secrets on Bitrise for a successful build.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html) for signing and deployment options.
- Check out the [Code signing guide](https://devcenter.bitrise.io/en/code-signing.html) for iOS and Android
steps:
- flutter-analyze@0:
inputs:
- project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
before_run: []
after_run: []
flutter-test1:
description: |
Builds and deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html#deploying-a-flutter-app).
If you build for iOS, make sure to set up code signing secrets on Bitrise for a successful build.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html) for signing and deployment options.
- Check out the [Code signing guide](https://devcenter.bitrise.io/en/code-signing.html) for iOS and Android
steps:
- flutter-test@1:
inputs:
- tests_path_pattern: UnitTest1.dart
- project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
before_run: []
after_run: []
flutter-test2:
description: |
Builds and deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html#deploying-a-flutter-app).
If you build for iOS, make sure to set up code signing secrets on Bitrise for a successful build.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html) for signing and deployment options.
- Check out the [Code signing guide](https://devcenter.bitrise.io/en/code-signing.html) for iOS and Android
steps:
- flutter-test@1:
inputs:
- tests_path_pattern: UnitTest2.dart
- project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
before_run: []
after_run: []
flutter-test3:
description: |
Builds and deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html#deploying-a-flutter-app).
If you build for iOS, make sure to set up code signing secrets on Bitrise for a successful build.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html) for signing and deployment options.
- Check out the [Code signing guide](https://devcenter.bitrise.io/en/code-signing.html) for iOS and Android
steps:
- flutter-test@1:
inputs:
- tests_path_pattern: UnitTest3.dart
- project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
before_run: []
after_run: []
ios:
description: |
Builds project and runs tests.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html).
steps:
- manage-ios-code-signing@1:
inputs:
- scheme: "$BITRISE_IOS_SCHEME"
- project_path: "$BITRISE_IOS_PROJECT_PATH"
- apple_team_id: DT2C2FZ7U2
- apple_service_connection: apple-id
- flutter-build@0:
inputs:
- platform: ios
- xcode-archive@4:
inputs:
- scheme: "$BITRISE_IOS_SCHEME"
- automatic_code_signing: apple-id
- project_path: "$BITRISE_IOS_PROJECT_PATH"
- xcode-build-for-test@2:
inputs:
- scheme: "$BITRISE_IOS_SCHEME"
- automatic_code_signing: apple-id
- apple_team_id: DT2C2FZ7U2
- project_path: "$BITRISE_IOS_PROJECT_PATH"
- aws-device-farm-runner@0: {}
- deploy-to-itunesconnect-deliver@2: {}
before_run:
- set-up-environment
- flutter-lint-test
after_run:
- finishing-build
primary:
description: |
Builds project and runs tests.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html).
steps:
- flutter-test@1:
inputs:
- generate_code_coverage_files: 'yes'
- project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
before_run:
- set-up-environment
after_run:
- finishing-build
set-up-environment:
description: |
Builds project and runs tests.
Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html).
steps:
- activate-ssh-key@4: {}
- git-clone@8: {}
- flutter-installer@0:
inputs:
- version: 3.7.0
- is_update: 'false'
- cache-pull@2: {}
test1:
description: 'Workflow to fail
'
before_run: []
after_run: []
steps:
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully
set -o pipefail
# debug log
set -x
# write your script here
echo "Hello World!"
# or run a script from your repository, like:
# bash ./path/to/script.sh
# not just bash, e.g.:
# ruby ./path/to/script.rb
# failed workflow
cd temp/
test2:
description: workflow to work
before_run: []
after_run: []
steps:
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully
set -o pipefail
# debug log
set -x
# write your script here
echo "Hello World!"
# or run a script from your repository, like:
# bash ./path/to/script.sh
# not just bash, e.g.:
# ruby ./path/to/script.rb
ls ./
meta:
bitrise.io:
stack: osx-xcode-14.2.x-ventura
machine_type_id: g2.4core
app:
envs:
- opts:
is_expand: false
BITRISE_FLUTTER_PROJECT_LOCATION: "."
- opts:
is_expand: false
BITRISE_IOS_PROJECT_PATH: "./iOS/Runner.xcworkspace"
- opts:
is_expand: false
BITRISE_IOS_SCHEME: Runner
trigger_map:
- push_branch: release
workflow: deploy
- push_branch: "*android*"
workflow: android
- pull_request_source_branch: android*
workflow: android
pull_request_target_branch: main
- pull_request_source_branch: ios*
pull_request_target_branch: main
workflow: ios