Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Jul 12, 2022
2 parents 035ab3c + a8df496 commit 7ea4ebd
Showing 1 changed file with 44 additions and 26 deletions.
70 changes: 44 additions & 26 deletions tools/jenkins/midpoint-conntest-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -32,51 +32,69 @@ spec:
]
) {
node(POD_LABEL) {
stage("checkout") {
git branch: "${BRANCH}",
url: 'https://github.com/Evolveum/midpoint.git'
echo "git checkout done..."
}
stage("build") {
container('maven') {
try {
try {
stage("checkout") {
git branch: "${BRANCH}",
url: 'https://github.com/Evolveum/midpoint.git'
echo "git checkout done..."
}
stage("build") {
container('maven') {
sh """#!/bin/bash -ex
if [ '${VERBOSE}' = '1' ]
then
env | sort
mvn --version
df -h
fi
env | sort
mvn --version
df -h
fi

mvn -B -ntp clean install -DskipTests=true -P -dist

if [ '${VERBOSE}' = '1' ]
if [ '${VERBOSE}' = '1' ]
then
df -h
fi
"""
} catch (err) {
echo "Caught: ${err}"
currentBuild.result = 'FAILURE'
}
}
}
stage("conntest") {
container('maven') {
try {
stage("conntest") {
container('maven') {
sh """#!/bin/bash -ex
mvn -B -ntp clean install -DskipConnTests=false -pl testing/conntest
mvn -B -ntp -Dmaven.test.failure.ignore clean install -DskipConnTests=false -pl testing/conntest

if [ '${VERBOSE}' = '1' ]
if [ '${VERBOSE}' = '1' ]
then
df -h
fi
"""
} catch (err) {
echo "Caught: ${err}"
currentBuild.result = 'FAILURE'
} finally {
currentBuild.result = 'SUCCESS'

step([$class: 'Publisher', reportFilenamePattern: '**/testng-results.xml'])

if (currentBuild.result == 'UNSTABLE' || params.ARCHIVE_LOGS) {
sh "tar --transform \"s-.*/--g\" -cvzf conntest-log.tgz testing/conntest/target/test.log"
archiveArtifacts allowEmptyArchive: true, artifacts: "conntest-log.tgz", followSymlinks: false
}
}
}
} catch (Exception e) {
currentBuild.result = 'FAILURE' // error below will not set result for mailer!
error 'Marking build as FAILURE because of: ' + e
} finally {
if (params.MAIL_NOTIFICATIONS) {
try {
step([$class: 'Mailer',
notifyEveryUnstableBuild: true,
recipients: params.MAIL_RECIPIENT ?: env.DEFAULT_MAIL_RECIPIENT,
sendToIndividuals: false])

sh """#!/bin/bash -ex
if [ "${verbose}" -ge 1 ]; then
df -h
fi
"""
} catch (Exception e) {
println 'Could not send email: ' + e
}
}
}
Expand Down

0 comments on commit 7ea4ebd

Please sign in to comment.