File tree Expand file tree Collapse file tree 2 files changed +110
-11
lines changed Expand file tree Collapse file tree 2 files changed +110
-11
lines changed Original file line number Diff line number Diff line change
1
+ job_template : &template
2
+ working_directory : &workdir /tmp/dozer
3
+ docker :
4
+ - image : circleci/openjdk:8-jdk
5
+ environment :
6
+ # set the JVM heap limit
7
+ MAVEN_OPTS : -Xmx3200m
8
+
9
+ version : 2
10
+ jobs :
11
+ prepare :
12
+ << : *template
13
+ steps :
14
+ - checkout
15
+
16
+ # download cached dependencies
17
+ - restore_cache :
18
+ keys :
19
+ - dozer-{{ checksum "pom.xml" }}
20
+ - dozer- # fallback to the latest cache
21
+
22
+ - run :
23
+ name : Install dependencies
24
+ command : mvn dependency:go-offline
25
+
26
+ # save any cache updates
27
+ - save_cache :
28
+ paths :
29
+ - ~/.m2
30
+ key : dozer-{{ checksum "pom.xml" }}
31
+
32
+ # save the dependencies for downstream jobs
33
+ - persist_to_workspace :
34
+ root : *workdir
35
+ paths :
36
+ - .
37
+
38
+ artifact :
39
+ << : *template
40
+ steps :
41
+ - attach_workspace :
42
+ at : *workdir
43
+
44
+ - run :
45
+ name : Build Dozer.jar
46
+ command : mvn package
47
+
48
+ # release Dozer.jar as a CircleCI artifact
49
+ - store_artifacts :
50
+ path : target/Dozer.jar
51
+ destination : Dozer.jar
52
+
53
+ # persist Dozer.jar to the test and deploy steps
54
+ - persist_to_workspace :
55
+ root : *workdir
56
+ paths :
57
+ - target/Dozer.jar
58
+
59
+ unit_test :
60
+ << : *template
61
+ steps :
62
+ - attach_workspace :
63
+ at : *workdir
64
+
65
+ # - run:
66
+ # name: Run unit tests
67
+ # command: mvn unit-tests
68
+
69
+ deploy :
70
+ working_directory : *workdir
71
+ docker :
72
+ - image : circleci/node:8
73
+ steps :
74
+ - attach_workspace :
75
+ at : *workdir
76
+
77
+ - run :
78
+ name : Install github-release-cli
79
+ command : sudo npm install -g github-release-cli
80
+
81
+ - run :
82
+ name : Create a new GitHub Release
83
+ command : >
84
+ github-release upload --owner $CIRCLE_PROJECT_USERNAME \
85
+ --repo $CIRCLE_PROJECT_REPONAME \
86
+ --tag $CIRCLE_TAG \
87
+ --name $CIRCLE_TAG \
88
+ target/Dozer.jar
89
+
90
+ workflows :
91
+ version : 2
92
+ build_and_deploy :
93
+ jobs :
94
+ - prepare
95
+ - artifact :
96
+ requires :
97
+ - prepare
98
+ - unit_test :
99
+ requires :
100
+ - artifact
101
+ - deploy :
102
+ type : approval
103
+ filters :
104
+ branches :
105
+ only :
106
+ - master
107
+ tags :
108
+ only : /.*/
109
+ requires :
110
+ - unit_test
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments