forked from checkstyle/checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.sh
executable file
·450 lines (418 loc) · 19 KB
/
wercker.sh
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
#!/bin/bash
# Attention, there is no "-x" to avoid problems on Wercker
set -e
function checkout_from {
CLONE_URL=$1
PROJECT=$(echo "$CLONE_URL" | sed -nE 's/.*\/(.*).git/\1/p')
mkdir -p .ci-temp
cd .ci-temp
if [ -d "$PROJECT" ]; then
echo "Target project $PROJECT is already cloned, latest changes will be fetched"
cd $PROJECT
git fetch
cd ../
else
for i in 1 2 3 4 5; do git clone $CLONE_URL && break || sleep 15; done
fi
cd ../
}
case $1 in
sonarqube)
# token could be generated at https://sonarcloud.io/account/security/
# executon on local:
# SONAR_TOKEN=xxxxxx PR=xxxxxx WERCKER_GIT_BRANCH=xxxxxx ./.ci/travis/travis.sh sonarqube
if [[ $PR && $PR =~ ^([0-9]*)$ ]]; then
SONAR_PR_VARIABLES="-Dsonar.pullrequest.key=$PR"
SONAR_PR_VARIABLES+=" -Dsonar.pullrequest.branch=$WERCKER_GIT_BRANCH"
SONAR_PR_VARIABLES+=" -Dsonar.pullrequest.base=master"
echo "SONAR_PR_VARIABLES: "$SONAR_PR_VARIABLES
fi
if [[ -z $SONAR_TOKEN ]]; then echo "SONAR_TOKEN is not set"; sleep 5s; exit 1; fi
export MAVEN_OPTS='-Xmx2000m'
mvn -e -Pno-validations clean package sonar:sonar $SONAR_PR_VARIABLES \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.projectKey=org.checkstyle:checkstyle \
-Dsonar.organization=checkstyle
echo "report-task.txt:"
cat target/sonar/report-task.txt
echo "Verification of sonar gate status"
checkout_from https://github.com/viesure/blog-sonar-build-breaker.git
sed -i'' "s|our.sonar.server|sonarcloud.io|" \
.ci-temp/blog-sonar-build-breaker/sonar_break_build.sh
export SONAR_API_TOKEN=$SONAR_TOKEN
.ci-temp/blog-sonar-build-breaker/sonar_break_build.sh
;;
no-error-pgjdbc)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/pgjdbc/pgjdbc.git
cd .ci-temp/pgjdbc/pgjdbc
mvn -e checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}
cd ../../
rm -rf pgjdbc
;;
no-error-orekit)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/Hipparchus-Math/hipparchus.git
cd .ci-temp/hipparchus
# checkout to version that Orekit expects
SHA_HIPPARCHUS="1fb""fb8a2a259a9""7a23e2a387e8fd""c5e0a8402e77"
git checkout $SHA_HIPPARCHUS
mvn install -DskipTests
cd -
checkout_from https://github.com/CS-SI/Orekit.git
cd .ci-temp/Orekit
# no CI is enforced in project, so to make our build stable we should
# checkout to latest release/development (annotated tag or hash) or sha that have fix we need
# git checkout $(git describe --abbrev=0 --tags)
git checkout "b67b419db7014f4b""ad921a1ba""c6c848384ad2b92"
mvn -e compile checkstyle:check -Dorekit.checkstyle.version=${CS_POM_VERSION}
cd ../
rm -rf Orekit
;;
no-error-xwiki)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/xwiki/xwiki-commons.git
cd .ci-temp/xwiki-commons
SHA_XWIKI="4fa""a8a49de3a70b""ba9c6c3849784e5d""fb642fa8d"
git checkout $SHA_XWIKI
mvn -f xwiki-commons-tools/xwiki-commons-tool-verification-resources/pom.xml \
install -DskipTests -Dcheckstyle.version=${CS_POM_VERSION}
mvn -e test-compile checkstyle:check@default -Dcheckstyle.version=${CS_POM_VERSION}
cd ../../
rm -rf xwiki-commons
;;
no-error-apex-core)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/apex-core
cd .ci-temp/apex-core
mvn -e compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}
cd ../
rm -rf apex-core
;;
no-error-equalsverifier)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/jqno/equalsverifier.git
cd .ci-temp/equalsverifier
mvn -e compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}
cd ../
rm -rf equalsverifier
;;
no-error-hibernate-search)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/hibernate/hibernate-search.git
cd .ci-temp/hibernate-search
mvn -e clean install -DskipTests=true -Dtest.elasticsearch.run.skip=true \
-Dcheckstyle.skip=true -Dforbiddenapis.skip=true \
-Dpuppycrawl.checkstyle.version=${CS_POM_VERSION}
mvn -e checkstyle:check -Dpuppycrawl.checkstyle.version=${CS_POM_VERSION}
cd ../
rm -rf hibernate-search
;;
no-error-htmlunit)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/HtmlUnit/htmlunit
cd .ci-temp/htmlunit
mvn -e compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}
cd ../
rm -rf htmlunit
;;
no-error-checkstyles-sevntu)
set -e
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
mvn -e compile verify -Dmaven.sevntu-checkstyle-check.checkstyle.version=${CS_POM_VERSION} \
-Dmaven.test.skip=true -Dcheckstyle.ant.skip=true -Dpmd.skip=true -Dspotbugs.skip=true \
-Djacoco.skip=true -Dforbiddenapis.skip=true -Dxml.skip=true
;;
no-error-sevntu-checks)
set -e
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/sevntu-checkstyle/sevntu.checkstyle.git
cd .ci-temp/sevntu.checkstyle/sevntu-checks
mvn -e -Pno-validations verify -Dcheckstyle.skip=false -Dcheckstyle.version=${CS_POM_VERSION} \
-Dcheckstyle.configLocation=../../../config/checkstyle_checks.xml
cd ../../
rm -rf sevntu.checkstyle
;;
no-error-contribution)
set -e
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution
cd patch-diff-report-tool
mvn -e verify -DskipTests -Dcheckstyle.version=${CS_POM_VERSION} \
-Dcheckstyle.configLocation=../../../config/checkstyle_checks.xml
cd ../
cd releasenotes-builder
mvn -e verify -DskipTests -Dcheckstyle.version=${CS_POM_VERSION} \
-Dcheckstyle.configLocation=../../../config/checkstyle_checks.xml
cd ../
cd ../../
rm -rf checkstyle
;;
no-error-methods-distance)
set -e
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/sevntu-checkstyle/methods-distance.git
cd .ci-temp/methods-distance
mvn -e verify -DskipTests -Dcheckstyle-version=${CS_POM_VERSION} \
-Dcheckstyle.configLocation=../../config/checkstyle_checks.xml
cd ../../
rm -rf checkstyle
;;
no-error-strata)
set -e
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/OpenGamma/Strata.git
cd .ci-temp/Strata
STRATA_CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${checkstyle.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
mvn install -e -B -Dstrict -DskipTests \
-Dforbiddenapis.skip=true -Dcheckstyle.version=${CS_POM_VERSION} \
-Dcheckstyle.config.suffix="-v$STRATA_CS_POM_VERSION"
cd ../
rm -rf Strata
;;
no-error-spring-integration)
set -e
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/spring-projects/spring-integration.git
cd .ci-temp/spring-integration
PROP_MAVEN_LOCAL="mavenLocal"
PROP_CS_VERSION="checkstyleVersion"
./gradlew clean check --parallel -x test -P$PROP_MAVEN_LOCAL -P$PROP_CS_VERSION=${CS_POM_VERSION}
cd ../
rm -rf spring-integration
;;
no-exception-struts)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-wercker.properties
sed -i'' 's/#apache-struts/apache-struts/' projects-for-wercker.properties
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-checkstyle-sevntu)
set -e
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-wercker.properties
sed -i'' 's/#local-checkstyle/local-checkstyle/' projects-for-wercker.properties
sed -i'' 's/#sevntu-checkstyle/sevntu-checkstyle/' projects-for-wercker.properties
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-checkstyle-sevntu-javadoc)
set -e
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-wercker.properties
sed -i'' 's/#local-checkstyle/local-checkstyle/' projects-for-wercker.properties
sed -i'' 's/#sevntu-checkstyle/sevntu-checkstyle/' projects-for-wercker.properties
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \
--config checks-only-javadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-guava)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-wercker.properties
sed -i'' 's/#guava/guava/' projects-for-wercker.properties
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-hibernate-orm)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#hibernate-orm/hibernate-orm/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-spotbugs)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#spotbugs/spotbugs/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-spoon)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#spoon/spoon/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-spring-framework)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#spring-framework/spring-framework/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-hbase)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#Hbase/Hbase/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-Pmd-elasticsearch-lombok-ast)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#pmd/pmd/' projects-to-test-on.properties
sed -i.'' 's/#elasticsearch/elasticsearch/' projects-to-test-on.properties
sed -i.'' 's/#lombok-ast/lombok-ast/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-alot-of-projects)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#RxJava/RxJava/' projects-to-test-on.properties
sed -i.'' 's/#java-design-patterns/java-design-patterns/' projects-to-test-on.properties
sed -i.'' 's/#MaterialDesignLibrary/MaterialDesignLibrary/' projects-to-test-on.properties
sed -i.'' 's/#apache-ant/apache-ant/' projects-to-test-on.properties
sed -i.'' 's/#apache-jsecurity/apache-jsecurity/' projects-to-test-on.properties
sed -i.'' 's/#android-launcher/android-launcher/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-warning-imports-guava)
PROJECTS=checks-import-order/projects-to-test-imports-guava.properties
CONFIG=checks-import-order/checks-imports-error-guava.xml
REPORT=reports/guava/site/index.html
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
groovy ./launch.groovy --listOfProjects $PROJECTS --config $CONFIG \
--checkstyleVersion ${CS_POM_VERSION}
RESULT=`grep -A 5 " Warning</td>" $REPORT | cat`
cd ../../
rm -rf contribution
if [ -z "$RESULT" ]; then
echo "Inspection did not find any warnings"
else
echo "$RESULT"
echo "Some warnings have been found. Verification failed."
sleep 5s
exit 1
fi
;;
no-warning-imports-java-design-patterns)
PROJECTS=checks-import-order/projects-to-test-imports-java-design-patterns.properties
CONFIG=checks-import-order/checks-imports-error-java-design-patterns.xml
REPORT=reports/java-design-patterns/site/index.html
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
groovy ./launch.groovy --listOfProjects $PROJECTS --config $CONFIG \
--checkstyleVersion ${CS_POM_VERSION}
RESULT=`grep -A 5 " Warning</td>" $REPORT | cat`
cd ../../
rm -rf contribution
if [ -z "$RESULT" ]; then
echo "Inspection did not find any warnings"
else
echo "$RESULT"
echo "Some warnings have been found. Verification failed."
sleep 5s
exit 1
fi
;;
*)
echo "Unexpected argument: $1"
sleep 5s
false
;;
esac