-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
.gitlab-ci.yml
68 lines (62 loc) · 1.75 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
stages:
- test
- deploy
build_on_debian:
stage: test
image: debian:stretch
except:
- gh-pages
variables:
ANDROID_HOME: /usr/lib/android-sdk
DEBIAN_FRONTEND: noninteractive
before_script:
- echo 'skipping sdkmanager, deps come from apt-get'
script:
- printf 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";\n'
> /etc/apt/apt.conf.d/99no-install-recommends
- printf 'APT::Acquire::Retries "20";\n'
> /etc/apt/apt.conf.d/99acquire-retries
- printf 'APT::Get::Assume-Yes "true";\n'
> /etc/apt/apt.conf.d/99assumeyes
- sed -i 's, main$, main contrib,' /etc/apt/sources.list
- apt-get update
- apt-get upgrade
- apt-get install git wget
- apt-get install --install-recommends
android-sdk
android-sdk-platform-23
google-android-m2repository-installer
libgradle-android-plugin-java
- gradle assemble
artifacts:
name: "${CI_PROJECT_PATH}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}_${CI_JOB_NAME}"
paths:
- app/build/outputs/apk/*.apk
expire_in: 1 week
when: on_success
after_script:
- echo "Download debug artifacts from https://gitlab.com/${CI_PROJECT_PATH}/-/jobs"
.website-template: &website-template
image: debian:buster-slim
variables:
GIT_SUBMODULE_STRATEGY: normal
script:
- apt-get update
- apt-get -qy install --no-install-recommends hugo
- sed -i "s,^baseURL\x3a.*,baseURL\x3a https://${CI_PROJECT_NAMESPACE}.gitlab.io/${CI_PROJECT_NAME}/," config.yaml
- hugo
- test -e public/es/index.html
website:
stage: test
except:
- master
- gh-pages
<<: *website-template
pages:
stage: deploy
only:
- master
artifacts:
paths:
- public
<<: *website-template