Skip to content

Commit 4f4a02d

Browse files
committed
Jenkinsfile: send Slack message on publish
1 parent e9595c6 commit 4f4a02d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Jenkinsfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pipeline {
1313
triggers {
1414
upstream(upstreamProjects: "ObjectStore-Linux/${env.BRANCH_NAME.replaceAll("/", "%2F")}",
1515
threshold: hudson.model.Result.SUCCESS)
16-
cron (cronSchedule)
16+
cron(cronSchedule)
1717
}
1818

1919
stages {
@@ -51,7 +51,15 @@ pipeline {
5151
BINTRAY_LOGIN = credentials('bintray_login')
5252
}
5353
steps {
54+
script {
55+
slackSend color: "#42ebf4",
56+
message: "Publishing ${currentBuild.fullDisplayName} to ${BINTRAY_URL}\n${env.BUILD_URL}"
57+
}
5458
sh './gradlew --stacktrace -PpreferedRepo=${BINTRAY_URL} -PpreferedUsername=${BINTRAY_LOGIN_USR} -PpreferedPassword=${BINTRAY_LOGIN_PSW} uploadArchives'
59+
script {
60+
slackSend color: "##41f4cd",
61+
message: "Published ${currentBuild.fullDisplayName} successfully to Bintray - check https://bintray.com/objectbox/objectbox\n${env.BUILD_URL}"
62+
}
5563
}
5664
}
5765

0 commit comments

Comments
 (0)