forked from credentials/irma_mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
45 lines (36 loc) · 1.27 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
image: privacybydesign/android_golang_dep_mobile_node_yarn:latest
stages:
- build
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- vendor/
- node_modules/
variables:
GIT_SUBMODULE_STRATEGY: normal
PACKAGE_NAME: github.com/privacybydesign/irma_mobile
before_script:
- set -euxo pipefail
# Signing key
- mkdir -p ~/.gradle
- echo -e "IRMA_RELEASE_STORE_FILE=${HOME}/.gradle/ci.keystore\nIRMA_RELEASE_KEY_ALIAS=ci\nIRMA_RELEASE_STORE_PASSWORD=123456\nIRMA_RELEASE_KEY_PASSWORD=123456" > ~/.gradle/gradle.properties
- keytool -genkey -v -keystore ~/.gradle/ci.keystore -alias ci -keyalg RSA -keysize 2048 -keypass 123456 -storepass 123456 -dname "cn=CI, ou=CI, o=CI, c=CI" -validity 20000
# GOPATH shenanigans
- mkdir -p "$GOPATH/src/$(dirname "$PACKAGE_NAME")"
- ln -s "$CI_PROJECT_DIR" "$GOPATH/src/$PACKAGE_NAME"
- cd "$GOPATH/src/$PACKAGE_NAME"
# Dependencies
- dep ensure -v
- yarn install --check-files
build:
stage: build
script:
# TODO: Remove this hacky commenting of Sentry gradle plugin
- sed -i -E 's/^(apply from.*sentry.gradle)/\/\/\1/' android/app/build.gradle
# Actually build
- cd android
- ./gradlew assembleRelease
- mv app/build/outputs/apk/release/*apk ../
artifacts:
paths:
- app-arm64-v8a-release.apk