Skip to content

Add Bitbucket Server (Stash)#1246

Merged
olblak merged 1 commit into
updatecli:mainfrom
naimo84-archive:main
Mar 27, 2023
Merged

Add Bitbucket Server (Stash)#1246
olblak merged 1 commit into
updatecli:mainfrom
naimo84-archive:main

Conversation

@naimo84

@naimo84 naimo84 commented Mar 26, 2023

Copy link
Copy Markdown
Contributor

follow-up of #1233

👍

@olblak

olblak commented Mar 27, 2023

Copy link
Copy Markdown
Member

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

olblak commented Mar 27, 2023

Copy link
Copy Markdown
Member

I opened this pullrequest on your fork naimo84-archive#1

@olblak

olblak commented Mar 27, 2023

Copy link
Copy Markdown
Member

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

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.

2 participants