-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
executable file
·153 lines (142 loc) · 3.81 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
stages:
- wakeBuildMachine
- buildAndTest
- publishLibs
- deploy
- shutdownBuildMachine
wakeBuildMachine:
stage: wakeBuildMachine
tags:
- small
script:
- ~/wakeRumpus.sh
shutdownBuildMachine:
stage: shutdownBuildMachine
when: always
tags:
- small
script:
- ~/shutdownRumpus.sh
buildAndTest:
stage: buildAndTest
tags:
- large
script:
- cd Code
- cp ~/Properties/MultiplatformTemplate/local.properties .
- ./gradlew buildAndTestApp
cache:
key: "$CI_COMMIT_REF_NAME-App"
policy: pull-push
paths:
- .gradle/wrapper
- .gradle/caches
- Code/Server/build
- Code/Shared/build
- Code/Lib/multi-mvp/build
- Code/Client/Desktop/build
- Code/Client/Shared/build
- Code/Client/iOS/Example/build
- Code/Client/iOS/SupportingFiles/build
- Code/Client/Android/tv/build
- Code/Client/Android/android-client-shared/build
- Code/Client/Android/mobile/build
- Code/Client/Android/build
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- Code/Server/build/*.war
- Code/Client/Desktop/build/*.zip
- Code/Client/Android/tv/build/outputs/apk/**/*.apk
- Code/Client/Android/mobile/build/outputs/apk/**/*.apk
- Code/Client/iOS/Example/build/**/*.ipa
# reports:
# junit:
# - Code/Server/build/reports/**/*.xml
# - Code/Shared/build/reports/**/*.xml
# - Code/Lib/multi-mvp/build/reports/**/*.xml
# - Code/Client/Desktop/build/reports/**/*.xml
# - Code/Client/Shared/build/reports/**/*.xml
# - Code/Client/Android/android-client-shared/build/reports/**/*.xml
# - Code/Client/Android/mobile/build/reports/**/*.xml
publishLibs:
tags:
- large
only:
- master
stage: publishLibs
script:
- cd Code
- cp ~/Properties/MultiplatformTemplate/local.properties .
- ./gradlew publishLibs
cache:
key: "${CI_COMMIT_REF_NAME}-App"
policy: pull
paths:
- Code/Lib/coroutines-ui/build
- Code/Lib/multi-mvp/build
deploy-server:
tags:
- nas
only:
- master
stage: deploy
script:
- cd Code
- cp ~/Properties/MultiplatformTemplate/local.properties .
- ./gradlew deployOnlyApp
- cp Server/build/libs/Server-0.0.1.war /var/lib/jetty/webapps/root.war
cache:
key: "${CI_COMMIT_REF_NAME}-App"
policy: pull
paths:
- Code/Server/build
- Code/Shared/build
environment:
name: staging
url: https://example.chrishatton.org/api/
# document-client:
# only:
# - master
# stage: buildAndTest
# script:
# - cd Code
# - cp ~/Properties/MultiplatformTemplate/local.properties .
# - cd Client
# - ./gradlew dokka
# - rm -rf /usr/share/nginx/html/example/doc/client/*
# - cp -R build/javadoc/client/* /usr/share/nginx/html/example/doc/client
# - cp build/javadoc/style.css /usr/share/nginx/html/example/doc
# cache:
# key: "$CI_COMMIT_REF_NAME"
# policy: pull
# paths:
# - build
# - .gradle
# Uses Kotlin's 'Dokka' plugin to generate and deploy documentation for the Server project
# (including the supporting 'Shared' framework)
document-server:
tags:
- nas
only:
- master
stage: buildAndTest
script:
- cd Code
- cp ~/Properties/MultiplatformTemplate/local.properties .
- cd Server
- ./gradlew dokka
- mkdir -p /usr/share/nginx/html/example/doc/server/
- rm -rf /usr/share/nginx/html/example/doc/server/*
- cp -R build/javadoc/server/* /usr/share/nginx/html/example/doc/server/
- cp build/javadoc/style.css /usr/share/nginx/html/example/doc/
cache:
key: "${CI_COMMIT_REF_NAME}-App"
policy: pull
paths:
- build
- .gradle