Updated Jankinsfile to send email first
testing/ogcore-api/pipeline/head There was a failure building this commit Details

pull/13/head
Nicolas Arenas 2024-11-20 17:41:31 +01:00
parent 80b39db993
commit eb5aff8e7f
1 changed files with 12 additions and 13 deletions

23
Jenkinsfile vendored
View File

@ -84,18 +84,6 @@ pipeline {
} }
post { post {
always { always {
sh "docker compose -f ${DOCKER_COMPOSE_FILE} cp php:/report/phpunit.xml phpunit.xml"
// Publish JUnit test results
xunit (
thresholds: [ skipped(failureThreshold: '0') , failed(failureThreshold: '0') ],
tools: [ PHPUnit(pattern: 'phpunit.xml') ]
)
// Remove containers
sh "docker compose -f ${DOCKER_COMPOSE_FILE} down"
sh "docker compose -f ${DOCKER_COMPOSE_FILE} rm -f"
sh "docker rmi ${DOCKER_IDENTITY}"
sh "docker rmi ${DOCKER_IDENTITY_NGINX}"
script { script {
def committerEmail = sh ( def committerEmail = sh (
script: "git show -s --pretty=%ae", script: "git show -s --pretty=%ae",
@ -113,6 +101,17 @@ pipeline {
Opengnsys CI Opengnsys CI
""" """
} }
sh "docker compose -f ${DOCKER_COMPOSE_FILE} cp php:/report/phpunit.xml phpunit.xml"
// Publish JUnit test results
xunit (
thresholds: [ skipped(failureThreshold: '0') , failed(failureThreshold: '0') ],
tools: [ PHPUnit(pattern: 'phpunit.xml') ]
)
// Remove containers
sh "docker compose -f ${DOCKER_COMPOSE_FILE} down"
sh "docker compose -f ${DOCKER_COMPOSE_FILE} rm -f"
sh "docker rmi ${DOCKER_IDENTITY}"
sh "docker rmi ${DOCKER_IDENTITY_NGINX}"
} }
} }
} }