Skip to content

Commit

Permalink
fix(ci): RHICOMPL-3942 add Slack notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Victoremepunto authored and LightOfHeaven1994 committed Aug 21, 2023
1 parent 05923de commit b29c8b9
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ pipeline {
}
environment {
APP_NAME="compliance"
ARTIFACTS_DIR=""
CICD_URL="https://raw.githubusercontent.com/RedHatInsights/cicd-tools/main"
COMPONENT_NAME="compliance"
COMPONENTS_W_RESOURCES="compliance"
IMAGE="quay.io/cloudservices/compliance-backend"
IQE_PLUGINS="compliance"
IQE_MARKER_EXPRESSION="compliance_smoke"
IQE_FILTER_EXPRESSION=""
IQE_CJI_TIMEOUT="30m"
IQE_FILTER_EXPRESSION=""
IQE_MARKER_EXPRESSION="compliance_smoke"
IQE_PLUGINS="compliance"
NOTIFICATIONS_CHANNEL="#team-clouddot-compliance-alarms"
REF_ENV="insights-stage"
COMPONENTS_W_RESOURCES="compliance"
ARTIFACTS_DIR=""

CICD_URL="https://raw.githubusercontent.com/RedHatInsights/cicd-tools/main"
}

stages {

stage('Build the PR commit image') {
steps {
withVault([configuration: configuration, vaultSecrets: secrets]) {
Expand Down Expand Up @@ -76,5 +77,11 @@ pipeline {
archiveArtifacts artifacts: 'artifacts/**/*', fingerprint: true
junit skipPublishingChecks: true, testResults: 'artifacts/junit-*.xml'
}
failure {
slackSend channel: NOTIFICATIONS_CHANNEL, color: "danger", message: "Build failed - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
}
unstable {
slackSend channel: NOTIFICATIONS_CHANNEL, color: "warning", message: "Build Unstable (Tests may've failed) - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
}
}
}

0 comments on commit b29c8b9

Please sign in to comment.