forked from salemove/ios-sdk-widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitrise.yml
347 lines (343 loc) · 10.9 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
format_version: "8"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: ios
workflows:
_increment_project_version:
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
if [ ! -z "$GITHUB_VERSION_INCREMENT_TYPE" ] ; then
envman add --key VERSION_INCREMENT_TYPE --value "$GITHUB_VERSION_INCREMENT_TYPE"
fi
- fastlane@3:
inputs:
- lane: ios create_pr_for_increment_project_version type:$VERSION_INCREMENT_TYPE
envs:
- opts:
is_expand: false
VERSION_INCREMENT_TYPE: patch
authenticated_increment_project_version:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8: {}
after_run:
- _increment_project_version
browserstack_upload:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8: {}
- cache-pull@2: {}
- certificate-and-profile-installer@1: {}
- script:
inputs:
- content: |-
bundle install
- cocoapods-install@2: {}
- recreate-user-schemes@1:
inputs:
- project_path: $BITRISE_PROJECT_PATH
- xcode-archive@4:
inputs:
- scheme: $APP_SCHEME
- team_id: $TEAM_ID
- export_method: $BITRISE_EXPORT_METHOD
- browserstack-upload@0:
inputs:
- upload_path: $BITRISE_IPA_PATH
- custom_id: $BROWSERSTACK_APP_ID
title: Upload test app to BrowserStack
- deploy-to-bitrise-io@2:
inputs:
- notify_email_list: $NOTIFY_EMAILS
- cache-push@2: {}
description: Workflow for creating builds of master branch. Triggered on each push to master branch, notifies over email + Slack (external)
deployment:
steps:
- activate-ssh-key@4: {}
- git-clone@8:
inputs:
- clone_depth: "-1"
- fetch_tags: "yes"
- cache-pull@2: {}
- script:
inputs:
- content: |-
bundle install
- cocoapods-install@2: {}
- xcode-test@4:
inputs:
- scheme: $TEST_SCHEME
- destination: platform=iOS Simulator,name=iPhone 13,OS=15.5
- git-tag@1:
inputs:
- tag: $NEW_VERSION
- generate-changelog@0: {}
- github-release@0:
inputs:
- username: $GITHUB_USERNAME
- name: Glia iOS Widgets SDK $NEW_VERSION
- body: $BITRISE_CHANGELOG
- api_token: $GITHUB_API_TOKEN
- draft: "no"
- tag: $NEW_VERSION
- commit: $GIT_CLONE_COMMIT_HASH
- script@1:
inputs:
- content: pod trunk push GliaWidgets.podspec --verbose --allow-warnings
- cache-push@2: {}
after_run:
- documentation
- _increment_project_version
- increment_widgets_version_in_cortex_financial
documentation:
description: Generates documentation using jazzy and uploads to AWS. This workflow doesn't checkout git repository and prepare xcproj/xcworkspace.
steps:
- fastlane@3:
inputs:
- work_dir: $BITRISE_SOURCE_DIR/$XCODE_PROJ_DIR
- lane: ios generate_docs
- amazon-s3-upload@3:
inputs:
- upload_bucket: "$AWS_BUCKET/widgets"
- access_key_id: $AWS_KEY
- secret_access_key: $AWS_PASSWORD
- acl_control: public-read
- upload_local_path: $BITRISE_SOURCE_DIR/$XCODE_PROJ_DIR/docs/
development-build:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8: {}
- cache-pull@2: {}
- certificate-and-profile-installer@1: {}
- script:
inputs:
- content: |-
bundle install
- cocoapods-install@2: {}
- recreate-user-schemes@1:
inputs:
- project_path: $BITRISE_PROJECT_PATH
- xcode-archive@4:
inputs:
- scheme: $APP_SCHEME
- team_id: $TEAM_ID
- export_method: $BITRISE_EXPORT_METHOD
- browserstack-upload@0:
inputs:
- upload_path: $BITRISE_IPA_PATH
- custom_id: $BROWSERSTACK_APP_ID
title: Upload test app to BrowserStack
- deploy-to-bitrise-io@2:
inputs:
- notify_email_list: $NOTIFY_EMAILS
- slack@3:
inputs:
- channel: '#tm-mobile-builds'
- text: iOS Build Succeeded!
- webhook_url_on_error: $SLACK_IOS_WEBHOOK
- channel_on_error: '#tm-mobile'
- text_on_error: '@mobile-caretaker iOS Build Failed! (development-build)'
- emoji_on_error: "\U0001F4A5"
- color_on_error: '#d9482b'
- from_username_on_error: Bitrise
- webhook_url: $SLACK_IOS_WEBHOOK
- cache-push@2: {}
description: Workflow for creating builds of development branch. Triggered on each push to development branch, notifies over email + Slack (external)
increment_widgets_version_in_cortex_financial:
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
curl https://app.bitrise.io/app/$CORTEX_DEMO_APP_SLUG/build/start.json -L --data \
'{
"hook_info": {
"type": "bitrise",
"build_trigger_token": "'"$CORTEX_DEMO_BUILD_TRIGGER_TOKEN"'"
},
"build_params": {
"branch": "master",
"workflow_id": "update_dependencies",
"environments": [{
"mapped_to": "VERSION",
"value": "'"$NEW_VERSION"'",
"is_expand": false
}]
},
"triggered_by":"curl"
}'
envs:
- opts:
is_expand: false
VERSION_INCREMENT_TYPE: patch
pull-request:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8: {}
- 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
make clone-snapshots-ci repo_url="https://$GITHUB_USERNAME:$GITHUB_API_TOKEN@$SNAPSHOTS_REPO"
- cache-pull@2: {}
- certificate-and-profile-installer@1: {}
- script:
inputs:
- content: |-
bundle install
- cocoapods-install: {}
- recreate-user-schemes@1:
inputs:
- project_path: $BITRISE_PROJECT_PATH
- xcode-test:
inputs:
- scheme: $TEST_SCHEME
- destination: platform=iOS Simulator,name=iPhone 13,OS=15.5
- xcode-test:
inputs:
- scheme: $SNAPSHOTS_SCHEME
- destination: platform=iOS Simulator,name=iPhone 13,OS=15.5
- xcode-test:
inputs:
- scheme: $TESTING_APP_TESTS_SCHEME
- destination: platform=iOS Simulator,name=iPhone 13,OS=15.5
- xcode-archive@4:
inputs:
- scheme: $APP_SCHEME
- team_id: $TEAM_ID
- cache_level: none
- export_method: $BITRISE_EXPORT_METHOD
- deploy-to-bitrise-io@2:
inputs:
- notify_email_list: ""
- cache-push@2: {}
description: Workflow for checking and building pull requests. Does not notify anywhere, but shows on the pull request itself.
update_dependencies:
steps:
- activate-ssh-key@4: {}
- git-clone@8: {}
- 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
git checkout development
- 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
cd $BITRISE_SOURCE_DIR
pod update --repo-update
- fastlane@3:
inputs:
- lane: ios create_pr_for_dependencies_update version:$VERSION checksum:$CHECKSUM
upload_to_appstore_connect:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8: {}
- cache-pull@2: {}
- certificate-and-profile-installer@1: {}
- script:
inputs:
- content: |-
bundle install
- cocoapods-install@2: {}
- bitrise-step-stamp-appicon-with-version-number@1:
inputs:
- stamp_version: TestFlight
- stamp_path_to_icons: TestingApp/Assets.xcassets/AppIcon.appiconset
- set-xcode-build-number@1:
inputs:
- plist_path: TestingApp/Info.plist
- xcode-archive@4:
inputs:
- scheme: $APP_SCHEME
- team_id: $TEAM_ID
- distribution_method: app-store
- export_method: $BITRISE_EXPORT_METHOD
- deploy-to-bitrise-io@2: {}
- deploy-to-itunesconnect-application-loader@1:
inputs:
- api_key_path: $BITRISEIO_appStoreAPIKeyUrl_URL
- api_issuer: 69a6de7f-8b71-47e3-e053-5b8c7c11a4d1
envs:
- opts:
is_expand: false
BITRISE_SCHEME: Release
- opts:
is_expand: false
BITRISE_EXPORT_METHOD: app-store
app:
envs:
- opts:
is_expand: false
BITRISE_PROJECT_PATH: GliaWidgets.xcworkspace
- opts:
is_expand: false
SDK_SCHEME: GliaWidgets
- opts:
is_expand: false
APP_SCHEME: TestingApp
- opts:
is_expand: false
BITRISE_EXPORT_METHOD: development
- opts:
is_expand: false
BROWSERSTACK_APP_ID: WidgetsSdkIosTestApp
- opts:
is_expand: false
CORTEX_DEMO_APP_SLUG: 2e5eb3394ea5598e
- opts:
is_expand: false
TEST_SCHEME: GliaWidgetsTests
- opts:
is_expand: false
SNAPSHOTS_SCHEME: SnapshotTests
- opts:
is_expand: false
TESTING_APP_TESTS_SCHEME: TestingAppTests
- opts:
is_expand: false
GIT_AUTHOR_NAME: BitriseBot
- opts:
is_expand: false
GIT_AUTHOR_EMAIL: [email protected]
trigger_map:
- push_branch: development
workflow: development-build
- pull_request_target_branch: '*'
workflow: pull-request
meta:
bitrise.io:
stack: osx-xcode-15.1.x-edge
machine_type_id: g2-m1.4core