bitsbeats / drone-tree-config

Drone helper for mono repositories.
Apache License 2.0
103 stars 24 forks source link

Add support for BitBucket repositories #4

Closed Oduig closed 5 years ago

Oduig commented 5 years ago

Solves https://github.com/bitsbeats/drone-tree-config/issues/2 I managed to extract a common interface and finish an implementation with BitBucket support.

It's quite a big change due to SCM-specific code having to be separated. It is fully backwards compatible with one exception, I thought it better to rename the GITHUB_SERVER variable to SERVER rather than making separate versions for each SCM. I have the image up on jodiug/drone-tree-config, if anyone in the community would like to test it that would be very helpful.

The following environment variables need to be passed drone-tree-config to add BitBucket support:

AUTH_SERVER: https://bitbucket.org
SERVER: https://api.bitbucket.org
BITBUCKET_CLIENT: client_id
BITBUCKET_SECRET: client_secret

You can use the same client credentials as you use for drone-master.