1+ #
2+ # Copyright 2012-2020 The Feign Authors
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+ # in compliance with the License. You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software distributed under the License
10+ # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+ # or implied. See the License for the specific language governing permissions and limitations under
12+ # the License.
13+ #
14+
15+ # common executors
16+ executors :
17+ java :
18+ docker :
19+ - image : velo/toolchains-4-ci-builds:with-21
20+
21+ # common commands
22+ commands :
23+ resolve-dependencies :
24+ description : ' Download and prepare all dependencies'
25+ steps :
26+ - run :
27+ name : ' Resolving Dependencies'
28+ command : |
29+ ./mvnw -ntp dependency:resolve-plugins go-offline:resolve-dependencies -DskipTests=true -B
30+ verify-formatting :
31+ steps :
32+ - run :
33+ name : ' Verify formatting'
34+ command : |
35+ scripts/no-git-changes.sh
36+ configure-gpg :
37+ steps :
38+ - run :
39+ name : ' Configure GPG keys'
40+ command : |
41+ echo -e "$GPG_KEY" | gpg --batch --no-tty --import --yes
42+ nexus-deploy :
43+ steps :
44+ - run :
45+ name : ' Deploy Core Modules Sonatype'
46+ command : |
47+ ./mvnw -ntp -nsu -s .circleci/settings.xml -P release -pl -:feign-benchmark -DskipTests=true deploy
48+
49+ # our job defaults
50+ defaults : &defaults
51+ working_directory : ~/feign
52+ environment :
53+ # Customize the JVM maximum heap limit
54+ MAVEN_OPTS : -Xmx3200m
55+
56+ # branch filters
57+ master-only : &master-only
58+ branches :
59+ only : master
60+
61+ tags-only : &tags-only
62+ branches :
63+ ignore : /.*/
64+ tags :
65+ only : /.*/
66+
67+ all-branches : &all-branches
68+ branches :
69+ ignore : master
70+ tags :
71+ ignore : /.*/
72+
73+ version : 2.1
74+
75+ jobs :
76+ test :
77+ executor :
78+ name : java
79+ << : *defaults
80+ steps :
81+ - checkout
82+ - restore_cache :
83+ keys :
84+ - feign-dependencies-v2-{{ checksum "pom.xml" }}
85+ - feign-dependencies-v2-
86+ - resolve-dependencies
87+ - save_cache :
88+ paths :
89+ - ~/.m2/repository
90+ key : feign-dependencies-v2-{{ checksum "pom.xml" }}
91+ - run :
92+ name : ' Test'
93+ command : |
94+ ./mvnw -ntp -B verify
95+ - verify-formatting
96+
97+ deploy :
98+ executor :
99+ name : java
100+ << : *defaults
101+ steps :
102+ - checkout
103+ - restore_cache :
104+ keys :
105+ - feign-dependencies-v2-{{ checksum "pom.xml" }}
106+ - feign-dependencies-v2-
107+ - resolve-dependencies
108+ - configure-gpg
109+ - nexus-deploy
110+
111+ workflows :
112+ version : 2
113+ build :
114+ jobs :
115+ - test :
116+ name : ' pr-build'
117+ filters :
118+ << : *all-branches
119+
120+ snapshot :
121+ jobs :
122+ - test :
123+ name : ' snapshot'
124+ filters :
125+ << : *master-only
126+ - deploy :
127+ name : ' deploy snapshot'
128+ requires :
129+ - ' snapshot'
130+ context : Sonatype
131+ filters :
132+ << : *master-only
133+
134+ release :
135+ jobs :
136+ - deploy :
137+ name : ' release to maven central'
138+ context : Sonatype
139+ filters :
140+ << : *tags-only
0 commit comments