Hi, How can we get an email notification when a pipeline fails to execute the Jenkinsfile due to a git fetch error or if the Jenkinsfile is malformed?
Jenkins setup:
Jenkins: 2.176.2 OS: Linux - 4.15.0-200-generic Java: 1.8.0_222 - Oracle Corporation (OpenJDK 64-Bit Server VM) --- Parameterized-Remote-Trigger:3.0.8 ace-editor:1.1 active-directory:2.16 allure-jenkins-plugin:2.28.1 amazon-ecr:1.6 analysis-core:1.96 ansicolor:0.6.2 ant:1.9 antisamy-markup-formatter:1.5 any-buildstep:0.1 apache-httpcomponents-client-4-api:4.5.5-3.0 artifactory:3.2.4 async-http-client:1.9.40.0 authentication-tokens:1.3 authorize-project:1.3.0 aws-credentials:1.27 aws-java-sdk:1.11.562 basic-branch-build-strategies:1.3.2 blueocean:1.22.0 blueocean-autofavorite:1.2.4 blueocean-bitbucket-pipeline:1.22.0 blueocean-commons:1.22.0 blueocean-config:1.22.0 blueocean-core-js:1.22.0 blueocean-dashboard:1.22.0 blueocean-display-url:2.3.0 blueocean-events:1.22.0 blueocean-git-pipeline:1.22.0 blueocean-github-pipeline:1.22.0 blueocean-i18n:1.22.0 blueocean-jira:1.22.0 blueocean-jwt:1.22.0 blueocean-personalization:1.22.0 blueocean-pipeline-api-impl:1.22.0 blueocean-pipeline-editor:1.22.0 blueocean-pipeline-scm-api:1.22.0 blueocean-rest:1.22.0 blueocean-rest-impl:1.22.0 blueocean-web:1.22.0 bouncycastle-api:2.17 branch-api:2.5.2 build-name-setter:2.0.1 build-pipeline-plugin:1.5.8 build-timeout:1.19 build-user-vars-plugin:1.5 checkstyle:4.0.0 cloud-stats:0.23 cloudbees-bitbucket-branch-source:2.4.4 cloudbees-disk-usage-simple:0.9 cloudbees-folder:6.9 cloverphp:0.5 cobertura:1.14 code-coverage-api:1.1.0 command-launcher:1.3 conditional-buildstep:1.3.6 config-file-provider:3.6 copyartifact:1.42.1 credentials:2.3.0 credentials-binding:1.19 display-url-api:2.3.1 docker-commons:1.15 docker-workflow:1.18 durable-task:1.29 email-ext:2.66 emailext-template:1.1 embeddable-build-status:2.0.1 envinject:2.1.6 envinject-api:1.5 environment-script:1.2.5 extended-read-permission:2.0 external-monitor-job:1.7 favorite:2.3.2 findbugs:5.0.0 flexible-publish:0.15.2 ghprb:1.42.0 git:3.10.0 git-client:2.7.7 git-server:1.7 github:1.29.4 github-api:1.111 github-branch-source:2.5.3 github-organization-folder:1.6 gitlab-merge-request-jenkins:2.0.0 gitlab-plugin:1.5.12 gradle:1.32 groovy:2.2 handlebars:1.1.1 handy-uri-templates-2-api:2.1.7-1.0 hashicorp-vault-plugin:3.0.0 hidden-parameter:0.0.4 htmlpublisher:1.18 http_request:1.8.22 icon-shim:2.0.3 ivy:2.1 jackson2-api:2.10.2 javadoc:1.5 jdk-tool:1.2 jenkins-design-language:1.22.0 jira:3.0.7 job-dsl:1.70 jobConfigHistory:2.22 jquery:1.12.4-0 jquery-detached:1.2.1 jquery-ui:1.0.2 jsch:0.1.55 junit:1.28 kubernetes:1.16.0 kubernetes-client-api:4.6.0-2 kubernetes-credentials:0.4.0 kubernetes-credentials-provider:0.13 ldap:1.20 lenientshutdown:1.1.1 lockable-resources:2.5 mailer:1.23 mapdb-api:1.0.9.0 matrix-auth:2.4.2 matrix-project:1.14 maven-plugin:3.2 mercurial:2.6 metrics:4.0.2.6 momentjs:1.1.1 monitoring:1.77.0 multi-branch-project-plugin:0.7 multiple-scms:0.6 next-executions:1.0.12 node-iterator-api:1.5.0 nodejs:1.3.1 p4:1.10.0 packer:1.5 pagerduty:0.4.1 pam-auth:1.5.1 parameterized-trigger:2.35.1 permissive-script-security:0.4 pipeline-aws:1.37 pipeline-build-step:2.9 pipeline-github-lib:1.0 pipeline-graph-analysis:1.10 pipeline-input-step:2.10 pipeline-milestone-step:1.3.1 pipeline-model-api:1.3.9 pipeline-model-declarative-agent:1.1.1 pipeline-model-definition:1.3.9 pipeline-model-extensions:1.3.9 pipeline-rest-api:2.11 pipeline-stage-step:2.3 pipeline-stage-tags-metadata:1.3.9 pipeline-stage-view:2.11 pipeline-utility-steps:2.3.0 plain-credentials:1.5 postbuild-task:1.8 postbuildscript:2.8.1 promoted-builds:3.2 pubsub-light:1.13 read-only-configurations:1.10 rebuild:1.31 resource-disposer:0.12 rich-text-publisher-plugin:1.4 role-strategy:2.11 run-condition:1.2 sbt:1.5 scm-api:2.4.1 script-security:1.60 simple-theme-plugin:0.5.1 slack:2.3 sonar:2.8.1 sse-gateway:1.20 ssh-agent:1.17 ssh-credentials:1.17 ssh-slaves:1.29.4 stash-pullrequest-builder:1.9 stoplightio-report:2.2.1 structs:1.20 support-core:2.56 testng-plugin:1.15 timestamper:1.9 token-macro:2.8 unique-id:2.2.0 uno-choice:2.1 variant:1.2 violations:0.7.11 windows-slaves:1.4 workflow-aggregator:2.6 workflow-api:2.35 workflow-basic-steps:2.18 workflow-cps:2.70 workflow-cps-global-lib:2.13 workflow-durable-task-step:2.31 workflow-job:2.32 workflow-multibranch:2.21 workflow-scm-step:2.9 workflow-step-api:2.20 workflow-support:3.3 ws-cleanup:0.37