-
Notifications
You must be signed in to change notification settings - Fork 81
/
.gitlab-ci.yml
196 lines (185 loc) · 4.74 KB
/
.gitlab-ci.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
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
STAGE_BUILD_PATH: "build"
STAGE_ARTIFACTS_PATH: "dist"
STAGE_TESTFLIGHT_ARTIFACTS_PATH: "apple_dist"
STAGE_ARCHIVE_NAME: "pia-vpn"
SERIALIZED_ARCHIVE_JSON: "$STAGE_ARTIFACTS_PATH/notify.json"
before_script:
- gem install bundler --no-ri --no-rdoc
#- bundle install
- bundle update
#- bundle exec fastlane run ensure_git_status_clean
- echo "$PIA_STAGING_ENDPOINT" >"Resources/staging.endpoint"
- echo "$PIA_CUSTOM_SERVERS" >"Resources/custom.servers"
- echo "$PIA_FIREBASE_PLIST" >"Resources/GoogleService-Info.plist"
stages:
- test
- archive
- deploy
- notify
# hidden
.unit_test:
stage: test
variables:
SCAN_SCHEME: "PIA VPN dev"
SCAN_DEVICES: "iPhone X"
script:
- bundle exec fastlane unit_test
only:
- branches
except:
- master
tags:
- ios
qa_archive:
stage: archive
variables:
MATCH_TYPE: "adhoc"
GYM_SCHEME: "PIA VPN dev"
GYM_EXPORT_METHOD: "ad-hoc"
script:
- bundle exec fastlane create_archive
artifacts:
paths:
- "$STAGE_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.*"
expire_in: 1 week
only:
- develop
- /^release.*$/
tags:
- ios
qa_deploy:
stage: deploy
variables:
IPA_OUTPUT_PATH: "$STAGE_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.ipa"
FL_HOCKEY_IPA: "$STAGE_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.ipa"
FL_HOCKEY_COMMIT_SHA: $CI_COMMIT_SHA
FL_HOCKEY_BUILD_SERVER_URL: "$CI_PROJECT_URL/-/jobs/$CI_JOB_ID"
FL_HOCKEY_REPOSITORY_URL: $CI_PROJECT_URL
FL_HOCKEY_NOTIFY: "false"
FL_HOCKEY_STRATEGY: "replace"
script:
- bundle exec fastlane qa_deploy
environment:
name: "hockey"
url: $HOCKEY_URL
artifacts:
paths:
- $SERIALIZED_ARCHIVE_JSON
expire_in: 1 week
only:
- develop
- /^release.*$/
tags:
- ios
beta_manual_archive:
stage: archive
variables:
MATCH_TYPE: "appstore"
GYM_SCHEME: "PIA VPN"
GYM_EXPORT_METHOD: "app-store"
script:
#- bundle exec fastlane clean_openssl
- bundle exec fastlane create_beta_archive
artifacts:
paths:
- "$STAGE_TESTFLIGHT_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.*"
expire_in: 1 week
when:
manual
only:
- /^release.*$/
tags:
- ios
beta_manual_deploy:
stage: deploy
variables:
PILOT_IPA: "$STAGE_TESTFLIGHT_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.ipa"
PILOT_DISTRIBUTE_EXTERNAL: "true"
DEMO_ACCOUNT_REQUIRED: "true"
script:
- bundle exec fastlane beta_deploy
environment:
name: "testflight"
when:
manual
only:
- /^release.*$/
tags:
- ios
manual_qa_archive:
stage: archive
variables:
MATCH_TYPE: "adhoc"
GYM_SCHEME: "PIA VPN dev"
GYM_EXPORT_METHOD: "ad-hoc"
script:
- bundle exec fastlane create_archive
when:
manual
artifacts:
paths:
- "$STAGE_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.*"
expire_in: 1 week
only:
- branches
tags:
- ios
manual_qa_deploy:
stage: deploy
variables:
IPA_OUTPUT_PATH: "$STAGE_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.ipa"
FL_HOCKEY_IPA: "$STAGE_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.ipa"
FL_HOCKEY_COMMIT_SHA: $CI_COMMIT_SHA
FL_HOCKEY_BUILD_SERVER_URL: "$CI_PROJECT_URL/-/jobs/$CI_JOB_ID"
FL_HOCKEY_REPOSITORY_URL: $CI_PROJECT_URL
FL_HOCKEY_NOTIFY: "false"
FL_HOCKEY_STRATEGY: "replace"
script:
- bundle exec fastlane qa_deploy
when:
manual
environment:
name: "hockey"
url: $HOCKEY_URL
artifacts:
paths:
- $SERIALIZED_ARCHIVE_JSON
expire_in: 1 week
only:
- branches
tags:
- ios
#beta_archive:
# stage: archive
# variables:
# MATCH_TYPE: "appstore"
# GYM_SCHEME: "PIA VPN"
# GYM_EXPORT_METHOD: "app-store"
# script:
# #- bundle exec fastlane clean_openssl
# - bundle exec fastlane create_archive
# artifacts:
# paths:
# - "$STAGE_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.*"
# expire_in: 1 week
# only:
# - master
# tags:
# - ios
#beta_deploy:
# stage: deploy
# variables:
# PILOT_IPA: "$STAGE_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.ipa"
# PILOT_DISTRIBUTE_EXTERNAL: "true"
# DEMO_ACCOUNT_REQUIRED: "true"
# script:
# - bundle exec fastlane beta_deploy
# environment:
# name: "testflight"
# only:
# - master
# tags:
# - ios