forked from mikereidis/headunit
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathwercker.yml
54 lines (53 loc) · 2.06 KB
/
wercker.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
box: gfx2015/android
# Build definition
build:
# The steps that will be executed on build
steps:
- script:
name: install android dependencies
code: |
echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
echo y | android update sdk --no-ui --all --filter build-tools-24.0.3
- script:
name: show base information
code: |
./gradlew -v
echo $ANDROID_HOME
echo $ANDROID_SDK_VERSION
echo $ANDROID_BUILD_TOOLS
echo $ANDROID_UPDATE_FILTER
echo $AWS_KEY
android list target
- script:
name: prepare gradle properties
code: |
echo $HEADUNIT_KEYSTORE | base64 --decode > keystore.jkc
echo $HEADUNIT_SCRIPT | base64 --decode > copyCert.sh
echo "" >> gradle.properties
echo "HEADUNIT_KEYSTORE_FILE=$WERCKER_SOURCE_DIR/keystore.jkc" >> gradle.properties
echo "HEADUNIT_KEYSTORE_PASSWORD=$HEADUNIT_KEYSTORE_PASSWORD" >> gradle.properties
echo "HEADUNIT_KEY_ALIAS=$HEADUNIT_KEY_ALIAS" >> gradle.properties
echo "HEADUNIT_KEY_PASSWORD=$HEADUNIT_KEY_PASSWORD" >> gradle.properties
echo "HEADUNIT_HOCKEYAPP_ID=$HEADUNIT_HOCKEYAPP_ID" >> gradle.properties
echo "echo dummy" > $WERCKER_SOURCE_DIR/dummy.sh
echo "HEADUNIT_SCRIPT_FILE=$WERCKER_SOURCE_DIR/dummy.sh" >> gradle.properties
- script:
name: run gradle
code: |
./gradlew --full-stacktrace -q --project-cache-dir=$WERCKER_CACHE_DIR build
after-steps:
# Show the build results
- script:
name: inspect build result
on: success
code: |
ls -la headunit/build/outputs/apk/
cp headunit/build/outputs/apk/*.apk $WERCKER_REPORT_ARTIFACTS_DIR
deploy:
steps:
- s3sync:
key-id: $AWS_KEY
key-secret: $AWS_SECRET
bucket-url: s3://hdu/apk/$WERCKER_GIT_COMMIT/
opts: --acl-public