diff --git a/Jenkinsfile b/Jenkinsfile index 64a48cd..389f4a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,9 +6,9 @@ pipeline { dockerhubrepo = "eeacms/reportek-base-dr" DEPENDENT_DOCKERFILE_URL="eea/eea.docker.reportek.mdr-instance/blob/master/Dockerfile eea/eea.docker.reportek.cdr-instance/blob/master/Dockerfile eea/eea.docker.reportek.bdr-instance/blob/master/Dockerfile" } - + stages { - + stage('Release') { when { branch 'master' @@ -21,7 +21,7 @@ pipeline { } } } - + stage('Release on tag creation') { when { buildingTag() @@ -40,22 +40,15 @@ pipeline { } post { - changed { + always { script { def url = "${env.BUILD_URL}/display/redirect" def status = currentBuild.currentResult def subject = "${status}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'" - def summary = "${subject} (${url})" def details = """

${env.JOB_NAME} - Build #${env.BUILD_NUMBER} - ${status}

Check console output at ${env.JOB_BASE_NAME} - #${env.BUILD_NUMBER}

""" - - def color = '#FFFF00' - if (status == 'SUCCESS') { - color = '#00FF00' - } else if (status == 'FAILURE') { - color = '#FF0000' - } + emailext (subject: subject, attachLog: true, compressLog: true, to: 'eea-edw-c-team-alerts@googlegroups.com', body: details) } } }