This plugin will provide build status notifications to flock messenger.
- Go to 'Manage Jenkins' from the Jenkins homepage.
- Navigate to
Manage Plugins, - Change the tab to
Available, - Search for
flock, - Check the box next to install.
- Navigate to
You can configure this plugin for each project on your Jenkins server.
- Navigate to the project.
- Click on
configure. - Click on
Add Post Build Action. - Select
Send Flock Notificationfrom the selection list.
Please follow this guide to generate a Webhook URL to be used in the plugin. https://github.com/talk-to/janus/blob/f2b1cbc3e6ce746e497832ff1bdf96c4c1ed1454/README.md (Private repository)
After generating the webhook, follow these steps.
- Put the generated webhook url in
Webhook URLfield. - Check the types of build notifications you'll want to receive.
This is the payload structure that PayloadManager class generate.
{ "projectName": "<The name of your project>", "displayName": "<The display name of your project>", "status": "<Status of the jenkins build>", // Possible values : “start”/ “success”/ “aborted” / “unstable” / “failure” / “not built”/ “regression” / “back to normal” "duration": "<duration of the build in seconds>" // Integer "runURL": "<URL of the build>", "changes": { "authors": ["name1", "name2"], "filesCount": <count of files changed> // Integer }, "causeAction": { "isSCM": false, //Boolean "other": "<short description for cause action> } } - To debug and build this plugin, you'll have to setup Maven and JDK on your system.
Java versionused to build:1.8.0_22 - Please follow the guide on https://jenkins.io/doc/developer/tutorial/prepare/ to setup Maven and JDK
- You can confirm the java version on your system by running
java -versioncommand in terminal.
Following is referenced from : https://wiki.jenkins.io/display/JENKINS/Plugin+tutorial It may be helpful to add the following to your ~/.m2/settings.xml (Windows users will find them in %USERPROFILE%.m2\settings.xml):
<settings> <pluginGroups> <pluginGroup>org.jenkins-ci.tools</pluginGroup> </pluginGroups> <profiles> <!-- Give access to Jenkins plugins --> <profile> <id>jenkins</id> <activation> <activeByDefault>true</activeByDefault> <!-- change this to false, if you don't like to have it on per default --> </activation> <repositories> <repository> <id>repo.jenkins-ci.org</id> <url>https://repo.jenkins-ci.org/public/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>repo.jenkins-ci.org</id> <url>https://repo.jenkins-ci.org/public/</url> </pluginRepository> </pluginRepositories> </profile> </profiles> <mirrors> <mirror> <id>repo.jenkins-ci.org</id> <url>https://repo.jenkins-ci.org/public/</url> <mirrorOf>m.g.o-public</mirrorOf> </mirror> </mirrors> </settings> This will let you use short names for Jenkins Maven plugins (i.e. hpi:create instead of org.jenkins-ci.tools:maven-hpi-plugin:1.61:create), though this is unnecessary once you are already working in a plugin project (only useful for initial hpi:create). Note that adding the Jenkins repositories in a profile like this is not really necessary since most (all?) plugins already define these repositories. And the mirror declaration is probably unnecessary.