Skip to content

Commit 9887eee

Browse files
Merge pull request #228 from rosette-api/NO-JIRA-fix-jenkins-not-failing-build
no-jira: fix jenkins skipping failed maven command return code
2 parents 54ad973 + 63d3883 commit 9887eee

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

CI.Jenkinsfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
node ("docker-light") {
22
def sourceDir = pwd()
33
try {
4+
def mavenLocalRepo = "$JENKINS_HOME/maven-local-repositories/executor-$EXECUTOR_NUMBER"
45
stage("Clean up") {
56
step([$class: 'WsCleanup'])
7+
sh "rm -rf $mavenLocalRepo"
68
}
79
stage("Checkout Code") {
810
checkout scm
911
}
10-
stage("Maven Build") {
12+
stage("Build") {
13+
withMaven(maven: "Basis",
14+
mavenLocalRepo: mavenLocalRepo,
15+
publisherStrategy: "EXPLICIT") {
16+
sh "mvn clean verify"
17+
}
18+
19+
}
20+
stage("Test with Docker") {
1121
withSonarQubeEnv {
1222
mySonarOpts="-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}"
1323
if ("${env.CHANGE_BRANCH}" != "null") {
@@ -23,9 +33,11 @@ node ("docker-light") {
2333
apt-get install -y git && \
2434
pushd /source && \
2535
/opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts; \
36+
maven_ret=\\\$?; \
2637
echo && \
2738
echo [INFO] Set file permissions to UID and GID of jenkins user for cleanup. && \
28-
chown -R 9960:9960 /source\""
39+
chown -R 9960:9960 /source && \
40+
exit \\\$maven_ret\""
2941
}
3042
}
3143
postToTeams(true)

Jenkinsfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
node ("docker-light") {
22
def SOURCEDIR = pwd()
33
try {
4+
def mavenLocalRepo = "$JENKINS_HOME/maven-local-repositories/executor-$EXECUTOR_NUMBER"
45
stage("Clean up") {
56
step([$class: 'WsCleanup'])
7+
sh "rm -rf $mavenLocalRepo"
68
}
79
stage("Checkout Code") {
810
checkout scm
911
}
12+
stage("Build") {
13+
withMaven(maven: "Basis",
14+
mavenLocalRepo: mavenLocalRepo,
15+
publisherStrategy: "EXPLICIT") {
16+
sh "mvn clean verify"
17+
}
18+
19+
}
1020
stage("Test with Docker") {
1121
echo "${env.ALT_URL}"
1222
def useUrl = ("${env.ALT_URL}" == "null") ? "${env.BINDING_TEST_URL}" : "${env.ALT_URL}"

json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static Map<String, RecordSimilarityField> parseRecord(JsonNode jsonNode, @Valid
4646
if (fields.containsKey(fieldName)) {
4747
final RecordSimilarityFieldInfo fieldInfo = fields.get(fieldName);
4848
final RecordSimilarityField fieldData;
49-
if (fieldInfo == null) {
49+
if (fieldInfo.getType() == null) {
5050
throw new IllegalArgumentException("Unspecified field type for: " + fieldName);
5151
}
5252
switch (fieldInfo.getType()) {

0 commit comments

Comments
 (0)