Add email notification to pipeline
testing/ogcore-api/pipeline/head This commit looks good
Details
testing/ogcore-api/pipeline/head This commit looks good
Details
parent
d4f8acae81
commit
6da4997f51
|
@ -82,10 +82,28 @@ pipeline {
|
||||||
tools: [ PHPUnit(pattern: 'phpunit.xml') ]
|
tools: [ PHPUnit(pattern: 'phpunit.xml') ]
|
||||||
)
|
)
|
||||||
// Remove containers
|
// Remove containers
|
||||||
|
|
||||||
sh "docker compose -f ${DOCKER_COMPOSE_FILE} down"
|
sh "docker compose -f ${DOCKER_COMPOSE_FILE} down"
|
||||||
sh "docker compose -f ${DOCKER_COMPOSE_FILE} rm -f"
|
sh "docker compose -f ${DOCKER_COMPOSE_FILE} rm -f"
|
||||||
sh "docker rmi ${DOCKER_IDENTITY}"
|
sh "docker rmi ${DOCKER_IDENTITY}"
|
||||||
sh "docker rmi ${DOCKER_IDENTITY_NGINX}"
|
sh "docker rmi ${DOCKER_IDENTITY_NGINX}"
|
||||||
|
script {
|
||||||
|
def committerEmail = sh (
|
||||||
|
script: "git show -s --pretty=%ae",
|
||||||
|
returnStdout: true
|
||||||
|
).trim()
|
||||||
|
def buildResult = currentBuild.currentResult
|
||||||
|
mail to: committerEmail,
|
||||||
|
subject: "Opengnsys CI Build ${env.JOB_NAME} - ${env.BRANCH_NAME} - ${buildResult}",
|
||||||
|
body: """
|
||||||
|
<h1>Opengnsys CI Build ${JOB_NAME} - ${BRANCH_NAME} - ${buildResult}</h1>
|
||||||
|
<p>Build Number: ${BUILD_NUMBER}</p>
|
||||||
|
<p>Build URL: ${BUILD_URL}</p>º
|
||||||
|
|
||||||
|
Saludos cordiales,
|
||||||
|
Opengnsys CI
|
||||||
|
"""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue