Skip to content

Commit 7bd1b30

Browse files
committed
Use slack threads
1 parent 44ff632 commit 7bd1b30

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

.jenkins/Jenkinsfile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pipeline {
1212
PROJECT = sh(script: "grep -m 1 'name =' conanfile.py | awk '{print \$3}' | tr -d '\n' | tr -d '\"'", returnStdout: true)
1313
CONAN_FLAGS = "-s:h compiler.cppstd=23 -c tools.build:skip_test=True --build missing --build '${PROJECT}*'"
1414
VER = sh(script: "grep -m 1 ' version =' conanfile.py | awk '{print \$3}' | tr -d '\n' | tr -d '\"'", returnStdout: true)
15+
SLACK_THREAD = '#sds-ci'
1516
}
1617
}
1718
}
@@ -29,7 +30,7 @@ pipeline {
2930
stage("Pre-flight") {
3031
steps {
3132
script {
32-
slackSend color: '#0063D1', channel: '#sds-ci', message: "🚀 *${PROJECT}* `${VER}` on `${BRANCH_NAME}` — build #${BUILD_NUMBER} has begun systems check\nCountdown initiated. Manage your expectations.\n<${BUILD_URL}|Watch nervously>"
33+
SLACK_THREAD = slackSend(color: '#0063D1', channel: '#sds-ci', message: "🚀 *${PROJECT}* `${VER}` on `${BRANCH_NAME}` — build #${BUILD_NUMBER} has begun systems check\nCountdown initiated. Manage your expectations.\n<${BUILD_URL}|Watch nervously>").threadId
3334
sh "conan graph info -s:h build_type=Debug ${CONAN_FLAGS} ."
3435
sh "conan graph info -s:h build_type=RelWithDebInfo -o sisl/*:malloc_impl=tcmalloc ${CONAN_FLAGS} ."
3536
}
@@ -38,9 +39,13 @@ pipeline {
3839

3940
stage("Ignition") {
4041
steps {
41-
slackSend color: '#9B59B6', channel: '#sds-ci', message: "⛽ *${PROJECT}* `${BRANCH_NAME}` build #${BUILD_NUMBER} \nAll systems Go...going somewhere anyways...\nLet's light this 🕯️... 3... 2... 1...!"
42+
script {
43+
slackSend color: '#9B59B6', channel: "${SLACK_THREAD}", message: "⛽ *${PROJECT}* `${BRANCH_NAME}` build #${BUILD_NUMBER} \nAll systems Go...going somewhere anyways...\nLet's light this 🕯️... 3... 2... 1...!"
44+
}
4245
sh "conan create -s:h build_type=Debug ${CONAN_FLAGS} ."
43-
slackSend color: '#E67E22', channel: '#sds-ci', message: "🧑‍🚀 *${PROJECT}* `${BRANCH_NAME}`\n*Debug: green.* One more build between us and home.\nI've been in here long enough to start naming the compiler warnings. Don't ask.\nRelWithDebInfo... *please don't fail me now.*"
46+
script {
47+
slackSend color: '#E67E22', channel: "${SLACK_THREAD}", message: "🧑‍🚀 *${PROJECT}* `${BRANCH_NAME}`\n*Debug: green.* One more build between us and home.\nI've been in here long enough to start naming the compiler warnings. Don't ask.\nRelWithDebInfo... *please don't fail me now.*"
48+
}
4449
sh "conan create -s:h build_type=RelWithDebInfo -o sisl/*:malloc_impl=tcmalloc ${CONAN_FLAGS} ."
4550
}
4651
}
@@ -52,17 +57,19 @@ pipeline {
5257
steps {
5358
sh "conan remote login -p ${ARTIFACTORY_PASS} ebay-local _service_sds"
5459
sh "conan upload '*:*' -r ebay-local --confirm"
55-
slackSend color: '#8A6BBF', channel: '#sds-ci', message: "📦 (`${BRANCH_NAME}`) — everyone survived long enough to land in Artifactory\nPackage `${PROJECT}@${VER}` is live and ready to pull downstream"
60+
script {
61+
slackSend color: '#8A6BBF', channel: "${SLACK_THREAD}", message: "📦 (`${BRANCH_NAME}`) — everyone survived long enough to land in Artifactory\nPackage `${PROJECT}@${VER}` is live and ready to pull downstream"
62+
}
5663
}
5764
}
5865
}
5966

6067
post {
6168
failure {
62-
slackSend color: '#E43237', channel: '#sds-ci', message: "💀 *${PROJECT}* `${VER}` (`${BRANCH_NAME}`) build #${BUILD_NUMBER} didn't make it\nHeld on for _${currentBuild.durationString}_ before calling it quits\n<${BUILD_URL}|Post-mortem>\n🪦"
69+
slackSend color: '#E43237', channel: "${SLACK_THREAD}", replyBroadcast: true, message: "💀 *${PROJECT}* `${VER}` (`${BRANCH_NAME}`) build #${BUILD_NUMBER} didn't make it\nHeld on for _${currentBuild.durationString}_ before calling it quits\n<${BUILD_URL}|Post-mortem>\n🪦"
6370
}
6471
success {
65-
slackSend color: '#85B717', channel: '#sds-ci', message: "✅ *${PROJECT}* `${VER}` (`${BRANCH_NAME}`) build #${BUILD_NUMBER} — it actually worked\nDebug + RelWithDebInfo both green in _${currentBuild.durationString}_\n<${BUILD_URL}|Full report>\n🍾 Mission succssful!"
72+
slackSend color: '#85B717', channel: "${SLACK_THREAD}", replyBroadcast: true, message: "✅ *${PROJECT}* `${VER}` (`${BRANCH_NAME}`) build #${BUILD_NUMBER} — it actually worked\nDebug + RelWithDebInfo both green in _${currentBuild.durationString}_\n<${BUILD_URL}|Full report>\n🍾 Mission successful!"
6673
}
6774
}
6875
}

0 commit comments

Comments
 (0)