-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
68 lines (61 loc) · 2.25 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
image: thyrlian/android-sdk
before_script:
- chmod +x gradlew
stages:
- build
build:
stage: build
script:
- chmod +x changeVersion.sh
- ./changeVersion.sh app/build.gradle " $CI_COMMIT_REF_NAME\_$CI_PIPELINE_ID" --append
- ./gradlew assembleDebug --stacktrace
artifacts:
paths:
- app/build/outputs/apk/debug/app-debug.apk
except:
- /^no_ci.*$/
- /^no_build.*$/
- /^no_build_no_tests.*$/
- /^no_build_no_deploy.*$/
- release
build_release:
stage: build
script:
- wget -O $KEYSTORE_FILE $KEYSTORE_URL -q
- ./gradlew clean check assembleRelease --stacktrace -Pandroid.injected.signing.store.file=$KEYSTORE_FILE -Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD -Pandroid.injected.signing.key.alias=$KEYSTORE_KEY_NAME -Pandroid.injected.signing.key.password=$KEYSTORE_KEY_PASSWORD -x test
artifacts:
paths:
- app/build/outputs/apk/release/app-release.apk
#upload:
# stage: webdeploy
# script:
# - cp -f app/build/outputs/apk/debug/app-debug.apk $DEV_DEPLOY_DIR/$CI_COMMIT_REF_NAME-$CI_PIPELINE_ID.apk
# - /./home/public/gitrunner/logCIBuilds.sh $DEV_DEPLOY_DIR
# - ln -s -f $DEV_DEPLOY_DIR/$CI_COMMIT_REF_NAME-$CI_PIPELINE_ID.apk $DEV_DEPLOY_DIR/0_latest_$CI_COMMIT_REF_NAME.apk
# except:
# - /^no_ci.*$/
# - /^no_deploy.*$/
# - /^no_tests_no_deploy.*$/
# - /^no_build_no_deploy.*$/
# - /^no_build.*$/
# - release
# artifacts:
# paths:
# - $DEV_DEPLOY_DIR/$CI_COMMIT_REF_NAME-$CI_PIPELINE_ID.apk
#upload_release:
# stage: webdeploy
# script:
# - cp -f app/build/outputs/apk/release/app-release.apk $RELEASE_DEPLOY_DIR/$(/./home/public/gitrunner/determineAppVersionName.sh app/build/outputs/apk/release/app-release.apk).apk
# only:
# - release
#functionalTests:
# stage: test
# script:
# - if [ ! -a `~/.android/avd/${AVD_NAME}.ini`]; then echo no | /home/public/android-sdk-linux/tools/android create avd -n ${AVD_NAME} -t android-${ANDROID_COMPILE_SDK} --abi google_apis/x86; fi
# - /home/public/android-sdk-linux/tools/emulator64-x86 -avd test -no-window -no-audio &
# - /./home/public/android-sdk-linux/wait-for-emulator.sh
# - adb shell input keyevent 82
# - ./gradlew cAT
# artifacts:
# paths:
# - app/build/reports/androidTests/