Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve bitbucket docs #2066

Merged
merged 2 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions docs/docs/30-administration/11-forges/50-bitbucket.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,38 @@ services:
environment:
- [...]
+ - WOODPECKER_BITBUCKET=true
+ - WOODPECKER_BITBUCKET_CLIENT=95c0282573633eb25e82
+ - WOODPECKER_BITBUCKET_SECRET=30f5064039e6b359e075
+ - WOODPECKER_BITBUCKET_CLIENT=... # called "Key" in Bitbucket
+ - WOODPECKER_BITBUCKET_SECRET=...

woodpecker-agent:
[...]
```

## Registration

You must register your application with Bitbucket in order to generate a client and secret. Navigate to your account settings and choose OAuth from the menu, and click Add Consumer.
You must register an OAuth application at Bitbucket in order to get a key and secret combination for woodpecker. Navigate to your workspace settings and choose `OAuth consumers` from the menu, and finally click `Add Consumer` (the url should be like: `https://bitbucket.org/[your-project-name]/workspace/settings/api`).

Please use the Authorization callback URL:
Please set a name and set the `Callback URL` like this:

```nohighlight
http://woodpecker.mycompany.com/authorize
https://<your-woodpecker-address>/authorize
```

![bitbucket oauth setup](bitbucket_oauth.png)

Please also be sure to check the following permissions:

```nohighlight
Account:Email
Account:Read
Team Membership:Read
Repositories:Read
Webhooks:Read and Write
Account: Email, Read
Workspace membership: Read
Projects: Read
Repositories: Read
Pull requests: Read
Webhooks: Read and Write
```

![bitbucket permissions](bitbucket_permissions.png)

## Configuration

This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations.
Expand All @@ -51,7 +56,7 @@ Enables the Bitbucket driver.
### `WOODPECKER_BITBUCKET_CLIENT`
> Default: empty

Configures the Bitbucket OAuth client id. This is used to authorize access.
Configures the Bitbucket OAuth client key. This is used to authorize access.

### `WOODPECKER_BITBUCKET_CLIENT_FILE`
> Default: empty
Expand Down
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.