projects:bitbucket:pullrequestplugin
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
projects:bitbucket:pullrequestplugin [2016/04/16 23:08] – created mkucia | projects:bitbucket:pullrequestplugin [2016/04/25 22:08] (current) – [Planned features] mkucia | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Bitbucket Server Pull Request Hook Plugin ====== | + | ====== Bitbucket Server |
+ | |||
+ | {{ : | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ===== Planned features ===== | ||
+ | * Multiple URLs | ||
+ | * Support for HTTPS | ||
+ | * Internationalization | ||
+ | ===== Introduction ===== | ||
+ | The plugin provides the following functionality: | ||
+ | * Notifying 3rd party services via REST interface about the changes in the project Pull Requests | ||
+ | * Notification on: | ||
+ | * PR creation/ | ||
+ | * PR decline | ||
+ | * PR merge | ||
+ | * New/ | ||
+ | * Per-repository configuration via ' | ||
+ | * Accessible by the repository administrators | ||
+ | * The following HTTP operations are supported: | ||
+ | * POST | ||
+ | * GET | ||
+ | * PUT | ||
+ | * DELETE | ||
+ | |||
+ | ===== Usage ===== | ||
+ | |||
+ | ==== Templating ==== | ||
+ | Several variables can be passed by the message URL or body. There is a special variable containing | ||
+ | comma separated list of available variables: | ||
+ | '' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ==== Authorization ==== | ||
+ | There is no dedicated field for authorization. One can add authorization header into ' | ||
+ | In such case the field will look like: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Please visit [[wp> | ||
+ | |||
+ | For Jenkins it is recommended to use | ||
+ | [[https:// | ||
+ | It allows using anonymous request + build token (think of API key). | ||
+ | |||
+ | ===== Example 1 ===== | ||
+ | - Create Jenkins job " | ||
+ | - Add String Parameter '' | ||
+ | - Add Token '' | ||
+ | - Check if the job is working | ||
+ | - Trigger job manually using your browser' | ||
+ | - Enter the (appropriate to your setup) URL '' | ||
+ | |||
+ | Entering URL will take you to an empty page. Back in Jenkins you should see that the job was triggered and parameter is successfully passed: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | - Add more String Parameters to the Jenkins job: | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - Configure Bitbucket Server | ||
+ | - Ensure that the plugin is installed. | ||
+ | - Enter any repository Settings, then Hooks | ||
+ | - Enable '' | ||
+ | - Enter URL '' | ||
+ | - Enable all triggers | ||
+ | - Save | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | - Test connection | ||
+ | - Create pull request | ||
+ | - Add a comment | ||
+ | |||
+ | After that you should notice that a new builds were run. Inspect those builds parameters. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | === Extras === | ||
+ | |||
+ | Jenkins job '' | ||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | <scm class=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Displaying Log ===== | ||
+ | There is a button in the configuration dialog that leads to a log. Communications are logged per-repository. | ||
+ | {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ===== Notes ===== | ||
+ | * Connection time-out is set to 5 seconds | ||
+ | ===== Test scenarios ===== | ||
+ | |||
+ | ==== Configuration ==== | ||
+ | * Entering incorrect URL | ||
+ | * https: | ||
+ | * 45434.com | ||
+ | * http:\\ space .com | ||
+ | * Entering incorrect header data | ||
+ | * without colon | ||
+ | * empty lines | ||
+ | |||
+ | ==== Core ==== | ||
+ | * Enable all notification types and check them one-by one | ||
+ | * Set all possible variables in body and check if it is valid for all notification types | ||
+ | * Use basic-auth header | ||
+ | |||
+ | ==== Weblog ==== | ||
+ | * Accessing non-existing log | ||
+ | * Accessing existing log by admin of other project | ||
+ | * Accessing log with non-configured plugin for given repository | ||
+ | * Accessing log when non-existing URL is set in config | ||
projects/bitbucket/pullrequestplugin.1460840925.txt.gz · Last modified: 2016/04/16 23:08 by mkucia