-
Notifications
You must be signed in to change notification settings - Fork 14
/
circle.yml
81 lines (71 loc) · 1.84 KB
/
circle.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
version: 2
jobs:
build:
working_directory: ~/zhcet
docker:
- image: circleci/openjdk:8-jdk-browsers
environment:
TZ: "/usr/share/zoneinfo/Asia/Kolkata"
environment:
TZ: "/usr/share/zoneinfo/Asia/Kolkata"
steps:
- checkout
- restore_cache:
key: npm-{{ checksum "package.json" }}
- restore_cache:
key: jars-{{ checksum "build.gradle" }}
- save_cache:
paths:
- node_modules/
key: npm-{{ checksum "package.json" }}
- run:
name: Download Gradle Dependencies
command: ./gradlew dependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}
- run:
name: Build, Run Tests and Bundle JAR
command: ./gradlew build
- store_artifacts:
path: build/libs
destination: jar
- store_artifacts:
path: build/reports/tests
destination: tests
- store_test_results:
path: build/reports/tests
docker-push:
working_directory: ~/zhcet
docker:
- image: circleci/openjdk:8-jdk-browsers
steps:
- checkout
- restore_cache:
key: npm-{{ checksum "package.json" }}
- restore_cache:
key: jars-{{ checksum "build.gradle" }}
- save_cache:
paths:
- node_modules/
key: npm-{{ checksum "package.json" }}
- setup_remote_docker
- run:
name: Deploy to DockerHub
command: bash .ci/scripts/docker-push.sh
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}
workflows:
version: 2
build-deploy:
jobs:
- build
- docker-push:
requires:
- build
filters:
branches:
only: master