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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Bitbucket Server (Stash) #1246

Merged
merged 1 commit into from
Mar 27, 2023
Merged

Add Bitbucket Server (Stash) #1246

merged 1 commit into from
Mar 27, 2023

Conversation

naimo84
Copy link
Contributor

@naimo84 naimo84 commented Mar 26, 2023

follow-up of #1233

馃憤

@olblak
Copy link
Member

olblak commented Mar 27, 2023

Thanks for the clean pullrequest.

I'll do a final review over the week but I just noticed a few improvement that are not part of the initial scope (to add stash scm support) which is why I don't consider them blocker and I can remove them in a later iteration.

The package pkg/plugins/resources/stash/release could probably be deleted as it relies on
https://github.com/drone/go-scm/blob/master/scm/driver/stash/release.go which do not work

Similarly to Gitlab/Gitea/GitHub, it could have been used to search the latest publish release as a source or condition but I don't even know if stash support the concept of "release" but the go-scm library do not, so I would just remove that code.

The package pkg/plugins/resources/stash/branch could be used as a source of condition if it is correctly
registered in pkg/core/pipeline/resource https://github.com/updatecli/updatecli/blob/main/pkg/core/pipeline/resource/main.go

Since It will be difficult to test it myself, that would be great if you could give it a try. Once registered, you should be able to have something like

sources:
  default:
    kind: stash/branch
    spec:
      owner: Xxx 
      repository: xxx 
      url: xxx 

something similar to giteabranch should be

While being able to use a source of type stash/tag vs gittag seems duplicated, the stash/tag queries an API, while gittag clones locally the full repository and then search for tags which can have performance consequences on very large git repositories with a lot of tags. I said it's out of the scope so you could also remove it

And same thing for pkg/plugins/resources/stash/tag

@olblak
Copy link
Member

olblak commented Mar 27, 2023

I opened this pullrequest on your fork naimo84#1

@olblak
Copy link
Member

olblak commented Mar 27, 2023

I opened this pullrequest on your fork naimo84#1

I'll proceed in a different order :) thank you for much for you contribution, I'll bring my changes in a different pullrequest

@olblak olblak added enhancement New feature or request scm-stash labels Mar 27, 2023
@olblak olblak merged commit 63f9411 into updatecli:main Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scm-stash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants