diff --git a/Jenkinsfile b/Jenkinsfile index 802522e..c303b21 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -83,19 +83,7 @@ pipeline { } post { - 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}" + always { script { def committerEmail = sh ( script: "git show -s --pretty=%ae", @@ -113,6 +101,17 @@ pipeline { 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}" } } }