This repository has been archived by the owner on May 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
91 lines (82 loc) · 2.6 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
# The image used in the jobs is generated from the Dockerfile available here:
# https://ci.linagora.com/linagora/lgs/openpaas/ci/blob/master/Dockerfile
stages:
- linter
- build
- test
- upload
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
lintDebug:
image: docker-registry.linagora.com:5000/lgs-sandbox/fastlane-android-29
stage: linter
tags:
- docker
script:
- bundle exec fastlane lintDebug
ktlint:
image: docker-registry.linagora.com:5000/lgs-sandbox/fastlane-android-29
stage: linter
tags:
- docker
script:
- bundle exec fastlane ktlint
check_author:
image: docker-registry.linagora.com:5000/lgs-releases/gitlab-integrity-checks:latest
stage: linter
variables:
GIT_DEPTH: "1"
tags:
- ultralight
script:
- check_author.py check "$GITLAB_USER_EMAIL" "$GITLAB_USER_NAME" --no-accents
except:
refs:
- master@linagora/lgs/linshare/products/linshare-mobile-android-app
- tags@linagora/lgs/linshare/products/linshare-mobile-android-app
- /^release-.*/@linagora/lgs/linshare/products/linshare-mobile-android-app
assembleDebug:
image: docker-registry.linagora.com:5000/lgs-sandbox/fastlane-android-29
stage: build
tags:
- docker
script:
- bundle exec fastlane assembleDebug
testDebug:
image: docker-registry.linagora.com:5000/lgs-sandbox/fastlane-android-29
stage: test
tags:
- docker
script:
- bundle exec fastlane testDebug
# This job is uploading APK to Google Play (internal track)
# It can only be triggered manually on master branch pipeline builds
# Process to promote the APK in Google Play is manual
# This job needs several protected variables:
# KEYSTORE: the content of the keystore in base 64 (hack, no way to store binary files in Gitlab without having it in the git repository)
# KEY_ALIAS: name of the key in the keystore
# KEY_PASSWORD: password of this key
# STORE_PASSWORD: password of the keystore
uploadInternal:
image: docker-registry.linagora.com:5000/lgs-sandbox/fastlane-android-29
stage: upload
tags:
- docker
# Add Google Play connection information needed by Fastlane
before_script:
- echo $JSON_KEY > google_play_api_key.json
- echo $KEYSTORE | base64 -d > keystore.jks
# finally remove them
after_script:
- rm google_play_api_key.json keystore.jks
script:
- bundle exec fastlane uploadInternal
rules:
- if: $CI_COMMIT_REF_NAME =~ "master"
when: manual
- if: $CI_COMMIT_REF_NAME =~ "/^release/"
when: manual
# Wait for the upgrade of Gitlab to 12.9 to make the regex work
- if: $CI_COMMIT_REF_NAME =~ "release-1.0.x"
when: manual