File tree Expand file tree Collapse file tree 1 file changed +73
-5
lines changed
Expand file tree Collapse file tree 1 file changed +73
-5
lines changed Original file line number Diff line number Diff line change 11version : 2
2+
3+ job-settings :
4+ defaults :
5+ agent-only : &defaults-agent-only
6+ docker :
7+ - image : groupbyinc/circleci-java
8+
9+ workflow-settings :
10+ context : &job-context
11+ context : org-global
12+
13+ main_branch_only : &main_branch_only
14+ filters :
15+ branches :
16+ only :
17+ - develop
18+
19+ workspace_key : &workspace_key
20+ key : v1-repo-{{ .Branch }}-{{ .Revision }}
21+
22+ dependency_cache_key : &dependency_cache_key
23+ run :
24+ name : Generate Dependency Cache Key
25+ command : /scripts/checksum.sh /tmp/checksum
26+
27+ cache_key : &cache_key
28+ key : v1-dependencies-{{checksum "/tmp/checksum"}}-{{ .Revision }}
29+
30+ setup_builder : &setup_builder
31+ run :
32+ name : Initialize Build Agent
33+ command : /scripts/setup.sh
34+
235jobs :
336 build :
4- docker :
5- - image : circleci/openjdk:8u171-jdk
37+ << : *defaults-agent-only
638 steps :
7- - checkout
8- - run : mvn clean install
9- - run : mvn surefire:test -Punit
39+ - checkout
40+ - *dependency_cache_key
41+ - restore_cache : *cache_key
42+ - *setup_builder
43+ - run : mvn clean install
44+ - run : mvn surefire:test -Punit
45+ - save_cache :
46+ << : *cache_key
47+ paths :
48+ - ~/.m2
49+ - save_cache :
50+ << : *workspace_key
51+ paths :
52+ - ~/.ssh
53+ - ~/project
54+ release :
55+ << : *defaults-agent-only
56+ steps :
57+ - restore_cache : *workspace_key
58+ - *dependency_cache_key
59+ - restore_cache : *cache_key
60+ - *setup_builder
61+ - run : mvn -B release:prepare release:perform
62+
63+ workflows :
64+ version : 2
65+ build-and-push :
66+ jobs :
67+ - build : *job-context
68+ - hold :
69+ << : *main_branch_only
70+ type : approval
71+ requires :
72+ - build
73+ - release :
74+ << : *main_branch_only
75+ << : *job-context
76+ requires :
77+ - hold
You can’t perform that action at this time.
0 commit comments