Commit 41ceaf23 authored by carignani's avatar carignani
Browse files

notify on success (fix #8), don't notify cti_support

parent 24314b66
Loading
Loading
Loading
Loading
+22 −3
Original line number Diff line number Diff line
@@ -65,6 +65,28 @@ pipeline {
    }
    
    post {


        success {
            script {
                if (env.resolveSucceded == "false") {
                    updateGitlabCommitStatus name: 'Resolve', state: 'failed'
                }
                RECIPIENT = """${sh(
                    returnStdout: true,
                    script: "cd apis && git log --format='%ae' HEAD^!"
                )}"""
            }

            echo "Sending email to: ${RECIPIENT}" 
            mail to: "${RECIPIENT}",
                subject: "[3GPP Forge] Validation succeeded: ${currentBuild.fullDisplayName}",
                body: "Your contribution to 3GPP Forge was applied successfully and, " +
                    "after running the validation process for all the files in the repository, " +
                    "no critial errors were detected. " +
                    "Detailed information in the 'Console output' at ${env.BUILD_URL}"
        }

        failure {
            script {
                if (env.resolveSucceded == "false") {
@@ -76,9 +98,6 @@ pipeline {
                )}"""
            }

            mail to: 'cti_support@etsi.org',
                subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
                body: "Something is wrong with ${env.BUILD_URL}"
            echo "Sending email to: ${RECIPIENT}" 
            mail to: "${RECIPIENT}",
                subject: "[3GPP Forge] Validation failed: ${currentBuild.fullDisplayName}",