-
Notifications
You must be signed in to change notification settings - Fork 4
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for Azure DevOps #171
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yitsushi
added
enhancement
New feature or request
promotion
Bug or feature related to app promotion
labels
Mar 31, 2023
yitsushi
force-pushed
the
170-azure
branch
4 times, most recently
from
March 31, 2023 15:23
312aa4d
to
cafdb37
Compare
This change-set adds Azure DevOps support to pipeline promotions. Based on discussions (on Slack) we decided to go with a "copy as it is" solution to use the new GitProvider used in WGE (PR[^1] with 2 fixes[^2][^3]). It's a simple copy-paste what we have in WGE, but with a few addition and changes: * [addition] List Pull Requests. If we can't create a PR, we try to find an existing one with Pipelines. That logic does not exist in WGE. * [change] Do not create branch if we have no additional commits. On WGE we create a branch with the CreatePullRequest call (except in on case[^4]), but with pipelines we already have the branch with all required files and changes using pure git operations with clone and push. In this case we don't have additional commits, we only have to create the new branch if `len(input.commits) > 0`. * [addition] `Name()` and `SupportedDomain()`. These new functions were added to make it easier to verify or test given properties hidden behind the implementation of a Provder interface. We may want to port them back to WGE with extra testing. Additional changes: * Set Go version to 1.20 to match with WGE. Closes #170 [^1]: weaveworks/weave-gitops-enterprise#2450 [^2]: weaveworks/weave-gitops-enterprise#2585 [^3]: weaveworks/weave-gitops-enterprise#2625 [^4]: https://github.com/weaveworks/weave-gitops-enterprise/blob/main/pkg/git/gitlab.go#L108 Signed-off-by: Balazs Nadasdi <balazs@weave.works>
Signed-off-by: Balazs Nadasdi <balazs@weave.works>
yiannistri
approved these changes
Apr 5, 2023
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.
Looks great 👍
Co-authored-by: Yiannis <8741709+yiannistri@users.noreply.github.com>
Signed-off-by: Balazs Nadasdi <balazs@weave.works>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change-set adds Azure DevOps support to pipeline promotions. Based on discussions (on Slack) we decided to go with a "copy as it is" solution to use the new GitProvider used in WGE (PR1 with 2 fixes23).
It's a simple copy-paste what we have in WGE, but with a few addition and changes:
len(input.commits) > 0
.Name()
andSupportedDomain()
. These new functions were added to make it easier to verify or test given properties hidden behind the implementation of a Provder interface. We may want to port them back to WGE with extra testing.Closes #170
Footnotes
https://github.com/weaveworks/weave-gitops-enterprise/pull/2450 ↩
https://github.com/weaveworks/weave-gitops-enterprise/pull/2585 ↩
https://github.com/weaveworks/weave-gitops-enterprise/pull/2625 ↩
https://github.com/weaveworks/weave-gitops-enterprise/blob/main/pkg/git/gitlab.go#L108 ↩