Skip to content

Commit

Permalink
midpoint-quick-pipeline: first email experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Jun 1, 2022
1 parent f44919e commit 8edd692
Showing 1 changed file with 47 additions and 23 deletions.
70 changes: 47 additions & 23 deletions tools/jenkins/midpoint-quick-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,56 @@ podTemplate(
]
) {
node(POD_LABEL) {
stage("checkout") {
git branch: params.BRANCH ?: 'master',
url: 'https://github.com/Evolveum/midpoint.git'
}
stage("build") {
container('maven') {
sh """#!/bin/bash -ex
if [ "${verbose}" -ge 1 ]
then
id
env | sort
mvn --version
fi
try {
stage("checkout") {
git branch: params.BRANCH ?: 'master',
url: 'https://github.com/Evolveum/midpoint.git'
}
stage("build") {
container('maven') {
sh """#!/bin/bash -ex
if [ "${verbose}" -ge 1 ]
then
id
env | sort
mvn --version
fi

mvn -B -ntp -Dmaven.test.failure.ignore clean install -P -dist -DintegrationTestSuite=fast

mvn -B -ntp -Dmaven.test.failure.ignore clean install -P -dist -DintegrationTestSuite=fast
if [ "${verbose}" -ge 1 ]
then
df -h
fi
"""

step([$class: 'Publisher',
reportFilenamePattern: '**/testng-results.xml',
// failureOnFailedTestConfig: true // TODO we don't want failure, but how can we make it unstable?
])
}
}
} finally {
if (verbose > '0') {
echo "Build: ${currentBuild}"
echo "Result: ${currentBuild.currentResult}"
}

if [ "${verbose}" -ge 1 ]
then
df -h
fi
"""
try {
/*
mail (
to: env.DEFAULT_MAIL_RECIPIENT,
subject: 'test',
body: 'more test'
)
*/

step([$class: 'Publisher',
reportFilenamePattern: '**/testng-results.xml',
// failureOnFailedTestConfig: true // TODO we don't want failure, but how can we make it unstable?
])
step([$class: 'Mailer',
notifyEveryUnstableBuild: true,
recipients: env.DEFAULT_MAIL_RECIPIENT,
sendToIndividuals: false])
} catch (Exception e) {
println 'Couldn't send email: ' + e
}
}
}
Expand Down

0 comments on commit 8edd692

Please sign in to comment.