forked from ikikko/typetalk-plugin
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: referencing the documentation page from the project file https…
- Loading branch information
1 parent
301c819
commit 14d0664
Showing
10 changed files
with
157 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# CHANGELOG | ||
|
||
## Version 1.3.0 (Dec 29, 2017) | ||
|
||
- Fix POST to /typetalk/notify with CSRF protection | ||
|
||
## Version 1.2.0 (Mar 14, 2017) | ||
|
||
- Support pipeline | ||
|
||
## Version 1.1.0 (Feb 25, 2015) | ||
|
||
- Add "operation from Typetalk" features | ||
|
||
## Version 1.0.0 (May 12, 2014) | ||
|
||
- v1 release | ||
- 'Notify When Success' in Post-build Actions section is removed. | ||
- If you use it, please 'Notify end' in Build Environment section instead of it. | ||
|
||
## Version 0.9.1 (Feb 3, 2014) | ||
|
||
- Initial release ( not finished i18n ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Contributing to the Typetalk Plugin | ||
|
||
Plugin source code is hosted on [GitHub](https://github.com/jenkinsci/typetalk-plugin). | ||
New feature proposals and bug fix proposals should be submitted as | ||
[GitHub pull requests](https://help.github.com/articles/creating-a-pull-request). | ||
Your pull request will be evaluated by the [Jenkins job](https://ci.jenkins.io/job/Plugins/job/typetalk-plugin/). | ||
|
||
Before submitting your change, please assure that you've added tests that verify the change. | ||
|
||
## Code Coverage | ||
|
||
Code coverage reporting is available as a maven target. | ||
Please try to improve code coverage with tests when you submit. | ||
|
||
* `mvn -P enable-jacoco clean install jacoco:report` to report code coverage | ||
|
||
## Static Analysis | ||
|
||
Please don't introduce new spotbugs output. | ||
|
||
* `mvn spotbugs:check` to analyze project using [Spotbugs](https://spotbugs.github.io) | ||
* `mvn spotbugs:gui` to review report using GUI | ||
|
||
## File format | ||
|
||
Files in the repository are in Unix format (LF line terminators). | ||
Please continue using Unix file format for consistency. | ||
|
||
## Reporting Issues | ||
|
||
Report issues in the [Jenkins issue tracker](https://www.jenkins.io/participate/report-issue/redirect/#18421). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,114 @@ | ||
[](https://ci.jenkins.io/job/Plugins/job/typetalk-plugin/job/master/) | ||
# Typetalk Plugin | ||
|
||
This is a Jenkins plugin which notifies to [Typetalk](https://typetalk.com/). | ||
See [Plugin page](https://plugins.jenkins.io/typetalk/) for more details. | ||
## Introduction | ||
|
||
# How to build | ||
- ref : https://www.jenkins.io/doc/developer/plugin-development/build-process/ | ||
This is a Jenkins plugin which works with [Typetalk](https://typetalk.com/). Typetalk is a chat tool provided by [Nulab](https://nulab.com). | ||
|
||
## Launch for development | ||
## Feature | ||
|
||
### Send notification to Typetalk | ||
|
||
You can send notification to Typetalk when the following build events occur | ||
|
||
- when build starts / ends | ||
- when build fails | ||
|
||
 | ||
|
||
### Operate Jenkins from Typetalk | ||
|
||
You can operate Jenkins by mentioning to a bot in Typetalk and this enables you to do ChatOps. If you can understand Japanese, Refer to [this blog entry](http://nulab-inc.com/ja/blog/typetalk/chatops-without-programming) for more details. | ||
|
||
This plugin provides some features, like build/list projects. | ||
|
||
#### Build project | ||
|
||
 | ||
|
||
#### List projects | ||
|
||
 | ||
|
||
#### Show help messages | ||
|
||
 | ||
|
||
## Configuration | ||
|
||
### Global configuration | ||
|
||
At first, you must add credential to access Typetalk in the global configuration page. | ||
|
||
How to configure credentials: | ||
|
||
1. [Register a new application](https://typetalk.in/my/develop/applications/register) via the Typetalk Developer Application Page. Choose 'Client Credentials' in 'Grant Type'. Other items are optional. | ||
2. Input the 'Client ID' and 'Client Secret' displayed on the registration page. Input any value in 'Name'. | ||
|
||
 | ||
|
||
### Job configuration | ||
|
||
#### Build Environment | ||
|
||
In this section, you can configure notifications about starting/ending build. | ||
You can also change notification message as you like. | ||
|
||
 | ||
|
||
#### Post-build Actions | ||
|
||
In this section, you can configure notifications about build results. | ||
The notifications are sent when the build doesn't succeed and recovers. | ||
|
||
 | ||
|
||
#### Pipeline step | ||
|
||
You can use typetalk step in your pipeline as well as a classic style job. | ||
When you want to notify a build result, you can use 'typetalkSend' step with 'catchError'. | ||
|
||
``` | ||
./mvnw hpi:run | ||
node { | ||
catchError { | ||
sh 'might fail' | ||
} | ||
typetalkSend name: 'ikikko test', topicId: 9260 | ||
} | ||
``` | ||
|
||
## Package a plugin file | ||
You can also notify an event which starts and/or ends with 'withTypetalk' step. | ||
|
||
``` | ||
./mvnw clean hpi:hpi | ||
withTypetalk(name: 'ikikko test', notifyEnd: true, notifyEndMessage: '', notifyStart: true, notifyStartMessage: '', topicId: 9260) { | ||
// some block | ||
} | ||
``` | ||
|
||
If you don't install gradle, you can use gradlew / gradlew.bat instead of gradle. | ||
#### Notification URL | ||
|
||
In order to operate Jenkins from Typetalk, you should set a certain endpoint to Typetalk bot in a topic. | ||
|
||
### Bot for all Jenkins projects | ||
|
||
This plugin provides the following endpoint to receive message from Typetalk. You have to set it to a webhook URL of Typetalk bot. See the official document for more. | ||
|
||
`http://<Jenkins URL>/typetalk/notify` | ||
|
||
Then, you can operate Jenkins by mentioning to the bot as follows: | ||
|
||
- `@jenkins+ build <project> (<key=value>)` | ||
- `@jenkins+ list (<regexp filter>)` | ||
- `@jenkins+ help (<sub command>)` | ||
|
||
In this case, @jenkins+ is your bot name here. | ||
|
||
### Bot for a single Jenkins project | ||
|
||
By adding project name as a parameter of webhook URL, | ||
|
||
`http://<Jenkins URL>/typetalk/notify?project=<project>` | ||
|
||
then you can omit the name when mentioning to Typetalk bot like this. | ||
|
||
- `@jenkins-project+` | ||
- `@jenkins-project+ build (<key=value>)` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.