diff --git a/cypress/jenkins/Jenkinsfile b/cypress/jenkins/Jenkinsfile index 028f85290a5..28b6466c911 100644 --- a/cypress/jenkins/Jenkinsfile +++ b/cypress/jenkins/Jenkinsfile @@ -123,8 +123,12 @@ node { // Send Slack notification on failure or unstable builds if (currentBuild.result == 'FAILURE' || currentBuild.result == 'UNSTABLE') { - echo "Sending Slack notification for ${currentBuild.result} build" - sh "cypress/jenkins/slack-notification.sh ${currentBuild.result}" + if ("${env.SLACK_NOTIFICATION}".toLowerCase() != "false") { + echo "Sending Slack notification for ${currentBuild.result} build" + sh "cypress/jenkins/slack-notification.sh ${currentBuild.result}" + } else { + echo "Slack notification disabled (see jenkins-job-builder/qa-ui-tests.yml)" + } } else { echo "Build successful, no Slack notification needed" }