diff options
authorIgor Pashev <pashev.igor@gmail.com>2018-02-17 15:04:06 +0300
committerIgor Pashev <pashev.igor@gmail.com>2018-02-17 15:37:07 +0300
commit0a5d04270fc8b6b04440a0d45609c44b9d13020d (patch)
parent5e104c326af8f587568545406d2a973e715a0f25 (diff)
Update documentation
-rw-r--r--screenshots/bb-hook.pngbin0 -> 48720 bytes
-rw-r--r--screenshots/bbprb-config.pngbin0 -> 43899 bytes
3 files changed, 82 insertions, 8 deletions
diff --git a/README.md b/README.md
index 74514e7..18ca7e7 100644
--- a/README.md
+++ b/README.md
@@ -6,16 +6,90 @@ It was started by adding support for [Bitbucket webhooks](https://confluence.atl
and resulted in massive rewrite and deleting the code.
+Configuring Jenkins job
+This plugin needs credentials to access Bitbucket API. The credentials comprise
+the user's name and a password. This password is known as "App password" and
+it is not the same as the user's password.
+Only Git repositories are supported. No special configration is required
+for the [Git plugin](https://plugins.jenkins.io/git), but the repository URL
+should point to the same repository specified for this plugins. In fact,
+they may not match. After receiving a web-hook this plugin uses its options
+to find a job to be triggered, sets some relevant options (like commit hash)
+and starts the build. If repositories are not the same, you will just get a
+failure because the hash is not found, etc.
+These environment variables are set when the job is triggered by this plugin:
+Trigger's options in the job's XML configuration file:
+ <triggers>
+ <org.jenkinsci.plugins.bbprb.BitbucketBuildTrigger plugin="bbprb@0.1.0">
+ <ciKey>jenkins</ciKey>
+ <ciName>Jenkins</ciName>
+ <credentialsId>bitbucket-pwd</credentialsId>
+ <destinationRepository>bbuser/gitrepository</destinationRepository>
+ <cancelOutdatedJobs>true</cancelOutdatedJobs>
+ </org.jenkinsci.plugins.bbprb.BitbucketBuildTrigger>
+ </triggers>
+Trigger's options in Jenkins graphical user interface:
+![Jenkins trigger configuration](./screenshots/bbprb-config.png)
-Copyright © 2017 Igor Pashev <pashev.igor@gmail.com>
-Copyright © 2014 S.nishio + Martin Damovsky
+Configuring Bitbucket web-hook
+The end-point is `/bbprb-hook/`. Currently only two events are supported:
+pull request is created and pull request is updated.
+![Bitbucket web-hook configuration](./screenshots/bb-hook.png)
+Use [Apache Maven](https://maven.apache.org/) to build and package the plugin:
+$ cd bbprb
+$ mvn install
+This will create the file `./target/bbprb.hpi` that you can deploy to Jenkins.
+See [Jenkins Plugin tutorial](https://wiki.jenkins.io/display/JENKINS/Plugin+tutorial) for more details.
+Other useful commands are `mvn compile`, `mvn hpi:hpi`.
+(C) 2017-2018 Igor Pashev <pashev.igor@gmail.com>.
+(C) 2014 S.nishio + Martin Damovsky.
+This plugin is free software under the [BSD License](./COPYING).
-- BSD License
-- See COPYING file
diff --git a/screenshots/bb-hook.png b/screenshots/bb-hook.png
new file mode 100644
index 0000000..92975f3
--- /dev/null
+++ b/screenshots/bb-hook.png
Binary files differ
diff --git a/screenshots/bbprb-config.png b/screenshots/bbprb-config.png
new file mode 100644
index 0000000..85f19f4
--- /dev/null
+++ b/screenshots/bbprb-config.png
Binary files differ