forked from jenkinsci/bitbucket-push-and-pull-request-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue jenkinsci#316 add oauth config example
- Loading branch information
Showing
7 changed files
with
38 additions
and
2 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
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.
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
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,36 @@ | ||
|
||
## Warning | ||
This info is not created by the maintainer of the package. It is how I got it working by trial, error and looking at the code | ||
|
||
## Background | ||
* [Atlassian support page about Oauth Consumers](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/) | ||
|
||
## Steps | ||
|
||
### Create bitbucket.org oauth client | ||
|
||
* go to https://bitbucket.org/yourorganisation/workspace/settings/api (cogwheel -> workspace settings -> oauth consumer) | ||
* Add private consumer | ||
|
||
![example consumer](./img/bitbucket_oauth2_client.png) | ||
* Expand the consumer to show key and secret | ||
|
||
![consumer key and secret](./img/bitbucket_oauth2_keyandsecret.png) | ||
|
||
### Create Jenkins credential | ||
|
||
* go to jenkins credential manager https://jenkinsurl/manage/credentials/store/system/domain/_/ | ||
* Add credential | ||
* Type : Secret text | ||
* Secret : the Secret from bitbucket oauth consumer | ||
* ID : the Key from bitbucket oauth consumer | ||
* Description : | ||
|
||
![jenkins credential](./img/jenkins_oauth_secret.png) | ||
|
||
### Jenkins Job config | ||
|
||
Use the credential in the `Build with Butbucket Push and Pull Request Plugin` trigger | ||
|
||
![jenkins credential](./img/jenkins_job_trigger.png) | ||
|