-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitrise.yml
243 lines (222 loc) · 7.51 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
format_version: 7
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- ORIG_BITRISE_SOURCE_DIR: $BITRISE_SOURCE_DIR
workflows:
# ----------------------------------------------------------------
# --- workflow to Step Test
ci:
steps:
- go-list:
- golint:
- errcheck:
- go-test:
after_run:
- test_catalyst
- test_cloudkit
- test_objc
- test_xcode_8
- test_multi_target
- test_workspace
- test_tvos
- test_no_app_dsym
test_app_clip:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-io/Fruta
- BRANCH: xcode-12-gm
- BITRISE_PROJECT_PATH: Fruta.xcodeproj
- BITRISE_SCHEME: Fruta iOS
- EXPORT_METHOD: development
- OUTPUT_TOOL: xcodebuild
after_run:
- _common
test_catalyst:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-io/CatalystSample.git
- BRANCH: master
- BITRISE_PROJECT_PATH: Catalyst Sample.xcodeproj
- BITRISE_SCHEME: Catalyst Sample
- OUTPUT_TOOL: xcodebuild
- EXPORT_METHOD: development
- TEAM_ID: 72SA8V3WYL
after_run:
- _common
test_cloudkit:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-samples/sample-apps-ios-multi-target.git
- BRANCH: cloudkit
- BITRISE_PROJECT_PATH: code-sign-test.xcodeproj
- BITRISE_SCHEME: code-sign-test-Prod
- EXPORT_METHOD: development
- OUTPUT_TOOL: xcodebuild
- ICLOUD_CONTAINER_ENVIRONMENT: Production
after_run:
- _common
test_no_app_dsym:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-io/sample-apps-ios-simple-objc.git
- BRANCH: with-pods
- BITRISE_PROJECT_PATH: ios-simple-objc/ios-simple-objc.xcworkspace
- BITRISE_SCHEME: ios-simple-objc
- EXPORT_METHOD: development
- OUTPUT_TOOL: xcodebuild
- FORCE_CODE_SIGN_IDENTITY: "iPhone Developer: Dev Portal Bot Bitrise"
- TEAM_ID: 72SA8V3WYL
after_run:
- _common
test_objc:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-io/sample-apps-ios-simple-objc.git
- COMMIT: "65cd120bf4459c2881cfe2b731395b4efc53855d"
- BITRISE_PROJECT_PATH: ios-simple-objc/ios-simple-objc.xcodeproj
- BITRISE_SCHEME: ios-simple-objc
- EXPORT_METHOD: development
- OUTPUT_TOOL: xcodebuild
- FORCE_CODE_SIGN_IDENTITY: "iPhone Developer: Dev Portal Bot Bitrise"
- TEAM_ID: 72SA8V3WYL
after_run:
- _common
test_xcode_8:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-samples/ios-xcode-8.0.git
- BRANCH: "swift_version"
- BITRISE_PROJECT_PATH: ios-xcode-8.0/ios-xcode-8.0.xcodeproj
- BITRISE_SCHEME: ios-xcode-8.0
- EXPORT_METHOD: development
- FORCE_CODE_SIGN_IDENTITY: ""
- TEAM_ID: ""
- OUTPUT_TOOL: xcpretty
after_run:
- _common
test_multi_target:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-samples/sample-apps-ios-multi-target.git
- COMMIT: "ab36ed563bbc3125118e9f27df91474822dc0d46"
- BITRISE_PROJECT_PATH: code-sign-test.xcodeproj
- BITRISE_SCHEME: code-sign-test
- EXPORT_METHOD: development
- FORCE_CODE_SIGN_IDENTITY: "iPhone Developer: Dev Portal Bot Bitrise"
- TEAM_ID: 72SA8V3WYL
after_run:
- _common
test_workspace:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-samples/sample-apps-ios-workspace-swift.git
- COMMIT: "1360413258cc7f6a8676c17f060ff39899fc28b1"
- BITRISE_PROJECT_PATH: sample-apps-ios-workspace-swift.xcworkspace
- BITRISE_SCHEME: sample-apps-ios-workspace-swift
- EXPORT_METHOD: development
- FORCE_CODE_SIGN_IDENTITY: "iPhone Developer: Dev Portal Bot Bitrise"
- PROV_PROFILE_SPECIFIER: "BitriseBot-Wildcard"
- TEAM_ID: 72SA8V3WYL
after_run:
- _common
test_tvos:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-samples/sample-apps-tvos-swift.git
- BRANCH: "master"
- BITRISE_PROJECT_PATH: NPO Live.xcworkspace
- BITRISE_SCHEME: "NPO Live"
- EXPORT_METHOD: development
- FORCE_CODE_SIGN_IDENTITY: ""
- TEAM_ID: ""
- PROV_PROFILE_SPECIFIER: ""
- OUTPUT_TOOL: xcpretty
after_run:
- _common
_common:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
rm -rf "$ORIG_BITRISE_SOURCE_DIR/_tmp"
mkdir -p "$ORIG_BITRISE_SOURCE_DIR/_tmp"
- change-workdir:
title: Switch working dir to _tmp dir
run_if: true
inputs:
- path: "$ORIG_BITRISE_SOURCE_DIR/_tmp"
- is_create_path: true
- script:
inputs:
- content: |-
#!/usr/bin/env bash
if [[ -z "${SAMPLE_APP_URL}" ]]; then
echo "error: there is no SAMPLE_APP_URL env var specified"
exit 1
elif [[ -z "${COMMIT}" && -z "${BRANCH}" ]]; then
echo "error: can't checkout: there is no BRANCH or COMMIT env var specified"
exit 1
fi
git init
git remote add origin "${SAMPLE_APP_URL}"
git fetch || exit 1
[[ -n "${COMMIT}" ]] && git checkout "${COMMIT}" || git checkout "${BRANCH}"
- certificate-and-profile-installer:
- path::./:
inputs:
- export_method: $EXPORT_METHOD
- output_tool: $OUTPUT_TOOL
- force_code_sign_identity: $FORCE_CODE_SIGN_IDENTITY
- force_team_id: $TEAM_ID
- verbose_log: "yes"
- force_provisioning_profile_specifier: $PROV_PROFILE_SPECIFIER
- icloud_container_environment: $ICLOUD_CONTAINER_ENVIRONMENT
- team_id: $TEAM_ID
- script:
title: Output (generated by the Step) tests
is_always_run: true
inputs:
- content: |-
echo "-> BITRISE_IPA_PATH: $BITRISE_IPA_PATH"
echo "-> BITRISE_DSYM_PATH: $BITRISE_DSYM_PATH"
echo "-> BITRISE_XCARCHIVE_ZIP_PATH: $BITRISE_XCARCHIVE_ZIP_PATH"
echo "-> BITRISE_APP_DIR_PATH: $BITRISE_APP_DIR_PATH"
echo "-> BITRISE_DSYM_DIR_PATH: $BITRISE_DSYM_DIR_PATH"
echo "-> BITRISE_XCARCHIVE_PATH: $BITRISE_XCARCHIVE_PATH"
echo "-> BITRISE_IDEDISTRIBUTION_LOGS_PATH: $BITRISE_IDEDISTRIBUTION_LOGS_PATH"
echo "-> BITRISE_XCODE_RAW_RESULT_TEXT_PATH: $BITRISE_XCODE_RAW_RESULT_TEXT_PATH"
- script:
title: Validate exported artifacts
is_always_run: true
inputs:
- content: |-
#!/usr/bin/env bash
cd $BITRISE_DSYM_DIR_PATH
if [ $(ls *.dSYM | wc -l) -eq 0 ]; then
echo "error, there are no files in the exported dSYM path!"
exit 1
fi
if [ $(ls | wc -l) -gt $(ls *.dSYM | wc -l) ]; then
echo "error, there are non-dSYM files in the exported dSYM path!"
exit 1
fi
# ----------------------------------------------------------------
# --- Utility workflows
dep-update:
title: Dep update
description: |
Used for updating bitrise dependencies with dep
steps:
- script:
title: Dependency update
inputs:
- content: |-
#!/bin/bash
set -ex
go get -u -v github.com/golang/dep/cmd/dep
dep ensure -v
dep ensure -v -update
# ----------------------------------------------------------------
# --- workflow to Share this step into a Step Library
audit-this-step:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
stepman audit --step-yml ./step.yml