-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yml
More file actions
60 lines (60 loc) · 2.27 KB
/
Copy pathconfig.yml
File metadata and controls
60 lines (60 loc) · 2.27 KB
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
# Template configuration for Convertigo project CI build on CircleCI
# Please consult the CircleCI documentation for details about settings
# https://circleci.com/docs/2.0/configuration-reference/
#
# This sample assumes you have declared the following environment variables
# https://circleci.com/docs/2.0/env-vars/
#
# C8O_SERVER: Convertigo server endpoint, where the built mobile application will connect
# and the backend project will be deployed, like https://<myhost>/convertigo
# C8O_USER: Convertigo server admin or a user with role PROJECTS_CONFIG, used for the deploiment
# C8O_PASSWORD: Convertigo server password for the C8O_USER
#
# Discover all tasks and -Pconvertigo options in your project build.gradle file.
version: 2.1
workflows:
version: 2
convertigo:
jobs:
- build:
#only performs this build for the 'ci' git branch
filters:
branches:
only:
- ci
jobs:
build:
docker:
- image: cimg/openjdk:11.0
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: gradle dependencies
- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}
- restore_cache:
keys:
- v1-convertigo-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-convertigo-
- run:
name: Convertigo Mobile Application build and deploy
command: |
echo "Build the Mobile Application and deploy to $C8O_SERVER" && \
sh gradlew --no-daemon --stacktrace --info deploy \
-Pconvertigo.deploy.server=$C8O_SERVER \
-Pconvertigo.deploy.user=$C8O_USER \
-Pconvertigo.deploy.password=$C8O_PASSWORD \
-Pconvertigo.compileMobileBuilder.mode=debug \ # release mode needs to much resources for CircleCI, gradle or template tweak needed
-Pconvertigo.load.mobileApplicationEndpoint=$C8O_SERVER
- save_cache:
paths:
- ~/convertigo
key: v1-convertigo-{{ checksum "build.gradle" }}