-
Notifications
You must be signed in to change notification settings - Fork 280
feat: add support for Bitbucket Server (SCM + PR) #506
base: master
Are you sure you want to change the base?
feat: add support for Bitbucket Server (SCM + PR) #506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the tests, can you replace assert.Nil(t, err)
with assert.NoError(t, err)
and context.TODO()
with context.Background()
? They're just semantic differences, but should read just a tiny bit nicer.
Discover pull requests from repositories in a Bitbucket Server (not the same as Bitbucket Cloud). Private repos can be accessed via Basic auth (password or personal access token). Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
64c0b59
to
f198150
Compare
Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
Signed-off-by: mlosicki <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just clarifying questions at this point. Overall LGTM, will be happy to approve after clarifications!
Signed-off-by: mlosicki <[email protected]>
@mlosicki this morning got taken up by another review. But I should have a chance to do a last pass review no later than tomorrow morning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thanks for your patience on the review. 🙂
This is merged we can close it |
@mlosicki - A question about this PR. I can see that Basic Auth is implemented. We are using ssh with privatekeys stored in secrets towards bitbucket server. Do you know if this would work, or would we still need to provide basic auth as well? |
@simcax No, it won't work. Bitbucket Server doesn't have an option to authenticate to the REST API via ssh keys. Those keys are only used for Git operations. So you do need Basic auth, preferably via personal access tokens. |
Ah - of coures, that makes sense - although a bit of a nuisance having to create a service user of sorts. Thx! |
Has this PR been moved to applicationSet controller in ArgoCD, now that the applicationSet Controller is part of it? |
Cool! |
Implementation details
Uses Basic auth instead of access tokens like the other SCMs. Note that Personal Access Tokens do work with this.
PRs do not support labels. Added a
branchMatch
field for PRs which allows you to filter based on the source branch name (e.g. only consider PRs that include-argocd
)Repos do indeed support labels, but the
go-bitbucket-v1
library does not. It would have to be added upstream first.Speaking of
go-bitbucket-v1
, version was increased as it has some bugfixes that were merged and are related to this PR (e.g. missing pagination options)Closes #505