bitsbeats / drone-tree-config

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

Auth server for BitBucket client is not specified #11

Closed aku closed 4 years ago

aku commented 4 years ago

It seems that p.authClient in scm.go:23 is never initialized which causes a connection error

foosinn commented 4 years ago

From a quick look, the variable should come from env var AUTH_SERVER.

Can you verify this is set?

aku commented 4 years ago

I guess if I select a certain SCM provider then there should be some default value for it. It would be strange to provide GitHub\BitBucket endpoint manually. I will check later if providing value for this variable fixes the problem with the connection.

foosinn commented 4 years ago

Im not sure how bitbucket works. Github works with the token on its on, since its the default method (and how we use it)

Let me now if the bugfix works (docker image bitsbeats/drone-tree-config:issue10), afterwards i can create a new release.

foosinn commented 4 years ago

Update, the Variable is now called BITBUCKET_AUTH_SERVER

aku commented 4 years ago

I've managed to configure the plugin by setting these environment variables in my docker-compose config:

I think there should be separate variables like BITBUCKET_API_SERVER and BITBUCKET_AUTH_SERVER with proper default values to avoid confusion. Currently, it is not clear what values need to be set.

I propose to introduce new variables to specify an SCM explicitly. Then we can customize the selected SCM provider by setting additional params

foosinn commented 4 years ago

Was fixed with a41836bbd4ddba9fe818d1b1acac547187df6e0f

I updated the docs to make this cleaner.