Skip to content

Commit b696726

Browse files
committed
Fixing build on CircleCI.
1 parent 27dfc15 commit b696726

File tree

2 files changed

+25
-26
lines changed

2 files changed

+25
-26
lines changed

.circleci/config.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,44 +49,44 @@ jobs:
4949
mv -n /tmp/ws/home/circleci/project/.??* /home/circleci/project/
5050
- run:
5151
command: |
52+
# If no symbolic name, it's a PR, will run sonar
53+
if [ -n "$(git symbolic-ref HEAD 2>/dev/null )" ] ; then
54+
SONAR="jacoco:report sonar:sonar -Psonar -Dsonar.projectKey=$SONARCLOUD_PROJECTKEY"
55+
echo "Doing sonar"
56+
else
57+
SONAR=""
58+
fi
5259
mkdir -p /tmp/$CIRCLE_JOB
53-
mvn -B test -Pskip -Darg.line="-Xmx2048m" -Djava.io.tmpdir="/tmp/$CIRCLE_JOB" -s .circleci/settings.xml
60+
mvn -B test $SONAR -Pskip -Darg.line="-Xmx2048m" -Djava.io.tmpdir="/tmp/$CIRCLE_JOB" -s .circleci/settings.xml
5461
environment:
5562
MAVEN_OPTS: "-Xmx1024m"
5663
- store_test_results:
5764
path: target/surefire-reports
65+
- persist_to_workspace:
66+
root: /
67+
paths:
68+
- home/circleci/.m2/repository
69+
- home/circleci/.sonar/cache
70+
- home/circleci/project
5871
testsj17:
5972
docker:
6073
- image: cimg/openjdk:17.0
6174
steps:
6275
- attach_workspace:
63-
at: /tmp/ws
76+
at: /tmp/ws
6477
- run:
65-
command: |
66-
mv -n /tmp/ws/home/circleci/.m2 /home/circleci/
67-
mv -n /tmp/ws/home/circleci/project/* /home/circleci/project/
68-
mv -n /tmp/ws/home/circleci/project/.??* /home/circleci/project/
78+
command: |
79+
mv -n /tmp/ws/home/circleci/.m2 /home/circleci/
80+
mv -n /tmp/ws/home/circleci/project/* /home/circleci/project/
81+
mv -n /tmp/ws/home/circleci/project/.??* /home/circleci/project/
6982
- run:
70-
command: |
71-
# If no symbolic name, it's a PR, will run sonar
72-
if [ -n "$(git symbolic-ref HEAD 2>/dev/null )" ] ; then
73-
SONAR="jacoco:report sonar:sonar -Psonar"
74-
echo "Doing sonar"
75-
else
76-
SONAR=""
77-
fi
78-
mkdir -p /tmp/$CIRCLE_JOB
79-
mvn -B test $SONAR -Pskip -Darg.line="-Xmx2048m" -Djava.io.tmpdir="/tmp/$CIRCLE_JOB" -s .circleci/settings.xml
80-
environment:
81-
MAVEN_OPTS: "-Xmx1024m"
83+
command: |
84+
mkdir -p /tmp/$CIRCLE_JOB
85+
mvn -B test -Pskip -Darg.line="-Xmx2048m" -Djava.io.tmpdir="/tmp/$CIRCLE_JOB" -s .circleci/settings.xml
86+
environment:
87+
MAVEN_OPTS: "-Xmx1024m"
8288
- store_test_results:
83-
path: target/surefire-reports
84-
- persist_to_workspace:
85-
root: /
86-
paths:
87-
- home/circleci/.m2/repository
88-
- home/circleci/.sonar/cache
89-
- home/circleci/project
89+
path: target/surefire-reports
9090
testsj11:
9191
docker:
9292
- image: cimg/openjdk:11.0

.circleci/settings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<id>sonar</id>
1212
<properties>
1313
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
14-
<sonar.projectKey>${env.SONARCLOUD_KEY}</sonar.projectKey>
1514
<sonar.organization>${env.SONARCLOUD_ORG}</sonar.organization>
1615
<sonar.login>${env.SONARCLOUD_LOGIN}</sonar.login>
1716
</properties>

0 commit comments

Comments
 (0)