-
Notifications
You must be signed in to change notification settings - Fork 19
/
bitrise.yml
202 lines (186 loc) · 5.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
format_version: "10"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
workflows:
ci:
before_run:
- go-tests
after_run:
- test
go-tests:
steps:
- git::https://github.com/bitrise-steplib/steps-check.git: { }
test:
before_run:
- cache
- auth-all
auth-all:
before_run:
- auth-test-api-key-connection
- auth-test-apple-id-connection
- auth-test-api-key-input
- auth-test-apple-id-connection-globally-set-app-specific-password
cache:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-io/sample-apps-flutter-veggieseasons.git
- BRANCH: master
- XCODE_SCHEME: Runner
steps:
- script:
inputs:
- content: rm -rf ./_tmp
- change-workdir:
title: Switch working dir to test/_tmp dir
run_if: "true"
inputs:
- path: ./_tmp
- is_create_path: true
- git::https://github.com/bitrise-steplib/bitrise-step-simple-git-clone:
inputs:
- repository_url: $SAMPLE_APP_URL
- branch: $BRANCH
- clone_into_dir: .
- path::./:
title: Smoke test to check if Fastlane receives session-based Apple Developer connection
inputs:
- lane: test_fastlane_session
- work_dir: ./
- verbose_log: "yes"
- connection: apple_id
- flutter-installer:
inputs:
- flutter_version: 3.13.6
- manage-ios-code-signing:
run_if: "true"
inputs:
- project_path: ./ios/Runner.xcworkspace
- scheme: $XCODE_SCHEME
- configuration: Release
- distribution_method: development
- path::./:
title: Test building a Flutter project
inputs:
- lane: build
- work_dir: ./
- verbose_log: "yes"
- connection: "off"
- script:
inputs:
- content: |-
set -ex
if [[ -z "$BITRISE_CACHE_EXCLUDE_PATHS" ]] ; then
echo "BITRISE_CACHE_EXCLUDE_PATHS is empty"
exit 1
fi
if [[ -z "$BITRISE_CACHE_INCLUDE_PATHS" ]] ; then
echo "BITRISE_CACHE_INCLUDE_PATHS is empty"
exit 1
fi
auth-test-apple-id-connection:
before_run:
- _auth_prepare
steps:
- path::./:
inputs:
- lane: release
- work_dir: ./
- verbose_log: "yes"
- connection: apple_id
auth-test-apple-id-connection-globally-set-app-specific-password:
envs:
- FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: $APP_SPECIFIC_PASSWORD
before_run:
- _auth_prepare
steps:
- path::./:
inputs:
- lane: release
- work_dir: ./
- verbose_log: "yes"
- connection: apple_id
- app_password: ""
auth-test-api-key-connection:
before_run:
- _auth_prepare
steps:
- path::./:
inputs:
- lane: release
- work_dir: ./
- verbose_log: "yes"
- connection: api_key
auth-test-api-key-input:
before_run:
- _auth_prepare
steps:
- path::./:
inputs:
- lane: release
- work_dir: ./
- verbose_log: "yes"
- connection: "off"
- api_issuer: $AUTH_API_ISSUER
- api_key_path: $BITRISEIO_AUTH_API_KEY_PATH_URL
auth-test-tfa-disabled-apple-id-connection:
title: Test Apple ID connection authentication using TFA disabled account
description: |-
Use this workflow for manual testing TFA disabled Apple ID.
before_run:
- _auth_prepare
steps:
- path::./:
inputs:
- lane: release
- work_dir: ./
- verbose_log: "yes"
- connection: apple_id
_auth_prepare:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-samples/sample-apps-fastlane-test.git
- BRANCH: master
- INFO_PLIST_PATH: ./sample-apps-fastlane-test/Info.plist
steps:
- script:
title: Clean saved Fastlane session cookie
inputs:
- content: rm -rf ~/.fastlane
- script:
inputs:
- content: rm -rf ./_tmp
- change-workdir:
title: Switch working dir to test/_tmp dir
run_if: "true"
inputs:
- path: ./_tmp
- is_create_path: true
- git::https://github.com/bitrise-steplib/bitrise-step-simple-git-clone:
inputs:
- repository_url: $SAMPLE_APP_URL
- branch: $BRANCH
- clone_into_dir: .
- certificate-and-profile-installer: { }
- script:
inputs:
- content: |-
CURRENT_BUILD_NUMBER=${BITRISE_BUILD_NUMBER}
if [[ -z "$E2E_ORIG_BUILD_NUM" ]]; then
envman add --key E2E_ORIG_BUILD_NUM --value "$CURRENT_BUILD_NUMBER"
else
CURRENT_BUILD_NUMBER="$E2E_ORIG_BUILD_NUM"
fi
BITRISE_BUILD_NUMBER=$((($(gdate +%Y%m%d%H%M%S)-20000000000000)*10000))
if [[ -z "${BITRISE_BUILD_NUMBER}" ]]; then
echo "error: failed to calculated build number"
exit 1
fi
if [[ -n "${CURRENT_BUILD_NUMBER}" ]]; then
BITRISE_BUILD_NUMBER=$((${BITRISE_BUILD_NUMBER}+${CURRENT_BUILD_NUMBER}))
fi
envman add --key BITRISE_BUILD_NUMBER --value "${BITRISE_BUILD_NUMBER}"
- set-xcode-build-number:
title: Set Build Number
run_if: "true"
inputs:
- build_version: $BITRISE_BUILD_NUMBER
- plist_path: $INFO_PLIST_PATH
- build_version_offset: $BITRISE_BUILD_VERSION_OFFSET
- build_short_version_string: 1.0.2