Gradle Plugin to provide build status updates to Slack in real-time as Gradle executes through tasks
To use this plugin, the following buildscript repositories and dependencies must be configured:
buildscript {
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.github.warlordofmars:gradle-slack-liveupdate:release-0.3.12'
}
}
Then to apply the plugin:
apply plugin: 'com.github.warlordofmars.gradle.slack'
To configure:
slack {
// the slack channel to update during build
channel '<slack_channel>'
// slack api token (OAuth or Bot) with appropriate permissions
token '<slack_api_token>'
// flag for enabling slack functionality
// (useful for disabling for local builds)
enabled true
}
Here is an example of configuration that gets the Slack token out from a property value and only enables slack functionality during Jenkins builds:
slack {
channel 'jenkins'
enabled System.env.containsKey('JENKINS_URL')
token getProperty('slack.token)
}
Versioning on this project is applied automatically on all changes using the axion-release-plugin. Git tags are created for all released versions, and all available released versions can be viewed in the Releases section of this project.
- John Carter - warlordofmars
This project is licensed under the MIT License - see the LICENSE.md file for details
- Originally based off of gradle-slack-plugin by Mindera
- Using jslack library for Slack API functionality
- Using grgit library for Git branch / commit / author metadata in Slack updates
- Using the warlordofmars gradle plugin, gradle-release-helper, for automatic versioning, git tagging, and publishing of releases to GitHub
- Using the warlordofmars custom gradle distribution warlordofmars-gradle in order to define default repositories to avoid duplication across all projects
- Using the warlordofmars jenkins pipeline library jenkins-library for re-usable CI/CD pipeline components