-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
150 lines (131 loc) · 3.33 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
stages:
- test
- deployment
- release
- tags
- monitoring
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
.android_docker_image:
image: cirrusci/flutter:1.22.2
tags:
- docker
.marcela_osx:
script:
- bundle update fastlane
tags:
- ios
test:debian:
extends: .android_docker_image
stage: test
script:
- source .${CI_COMMIT_REF_NAME}.env
- flutter test --coverage
- genhtml coverage/lcov.info --output=coverage
artifacts:
paths:
- coverage/
expire_in: 5 days
test:macos:
extends: .marcela_osx
stage: test
script:
- source .${CI_COMMIT_REF_NAME}.env
- flutter test --coverage
- genhtml coverage/lcov.info --output=coverage
artifacts:
paths:
- coverage/
expire_in: 5 days
tags:
- ios
####################### IOS ###############################
ipa:testflight:
extends: test:macos
needs: ["test:macos"]
stage: deployment
before_script:
- source .${CI_COMMIT_REF_NAME}.env
- cd ios/
- gem install bundler
- bundle install --path vendor/bundle
- flutter pub get
- flutter pub run environment_config:generate
script:
- bundle exec fastlane beta
tags:
- ios
only:
- dev
- master
ipa:submit_to_review:
extends: ipa:testflight
stage: release
when: manual
allow_failure: false
script:
- bundle exec fastlane make_prod
only:
- master
ipa:push_tags:
extends: ipa:submit_to_review
stage: tags
release:
tag_name: ${CI_PIPELINE_ID}-iOS
description: 'iOS Release'
apk:push_tags:
extends: apk:prod_track
stage: tags
release:
tag_name: ${CI_PIPELINE_ID}-Android
description: 'Android Release'
ipa:sentry:dsyms:
extends: ipa:push_tags
stage: monitoring
script:
- bundle exec fastlane monitoring
- brew install getsentry/tools/sentry-cli
- sentry-cli releases set-commits --auto $CI_PIPELINE_ID
####################### ANDROID ###############################
apk:alpha_track:
stage: deployment
extends: .android_docker_image
before_script:
- source .${CI_COMMIT_REF_NAME}.env
# this will fetch the base64 encoded key store from our CI variables, decode it and place it underneath the path specified in build.gradle
- echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > android/key.jks
- cd android/
- gem install bundler
- bundle install
- flutter pub get
- flutter pub run environment_config:generate
script:
- flutter build apk --release --build-number=$CI_PIPELINE_ID --build-name=1.0.$CI_PIPELINE_ID
- bundle exec fastlane beta
artifacts:
paths:
- build/app/outputs/apk/release/app-release.apk
expire_in: 1 day
only:
- dev
apk:prod_track:
stage: release
extends: .android_docker_image
before_script:
- source .${CI_COMMIT_REF_NAME}.env
# this will fetch the base64 encoded key store from our CI variables, decode it and place it underneath the path specified in build.gradle
- echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > android/key.jks
- cd android/
- flutter pub get
- gem install bundler
- bundle install
script:
- flutter build apk --release --build-number=$CI_PIPELINE_ID --build-name=1.0.$CI_PIPELINE_ID
- bundle exec fastlane beta
artifacts:
paths:
- build/app/outputs/apk/release/app-release.apk
expire_in: 1 day
only:
- master