-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
54 lines (49 loc) · 1.01 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
stages:
- install
- test
- prebuild
- build
image: node:6.10.3
cache:
paths:
- node_modules/
install_dependencies:
stage: install
script:
- npm install
artifacts:
paths:
- node_modules/
unit_test:
stage: test
dependencies:
- install_dependencies
script:
- npm test
when: on_success
key_build:
stage: prebuild
script:
- npm install -g envsub
- bash createKeys-CI.sh
artifacts:
paths:
- android/
- src/
when: always
build_apk:
stage: build
image: docker.io/aossie/react-native-ci:version1.3
dependencies:
- key_build
- install_dependencies
script:
- mkdir -p android/app/src/main/assets
- react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
- cd android && ./gradlew assembleDebug
- cd ..
- mv android/app/build/outputs/apk/debug/app-debug.apk app-debug.apk
artifacts:
paths:
- app-debug.apk
when: always