-
Notifications
You must be signed in to change notification settings - Fork 39
argocd: add git functions to application #1039
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
Merged
Merged
Conversation
This file contains hidden or 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
As part of an effort to decouple and make reusable the gitdetails helper from cnf/ran in eco-gotests, this PR adds more generic versions of these helpers as methods on the Application builder itself. WithGitPathAppended is a more specific version of WithGitDetails that is more aligned with the common use case of updating to use a subdirectory of the git repo. WithGitDetails may still be used to update all of the git details if necessary. DoesGitPathExist can be called similar to WithGitPathAppended and checks if that path would exist. The way it checks should be mostly portable between git hosts, at least enough to cover the common cases. WaitForSourceUpdate allows verifying a change to the Application's source has taken effect.
cc: @josclark42 |
sebrandon1
approved these changes
May 14, 2025
klaskosk
added a commit
to klaskosk/eco-gotests
that referenced
this pull request
May 14, 2025
Related to rh-ecosystem-edge/eco-goinfra#1039, this commit refactors the gitopsztp suite to incorporate the new methods introduced for the ApplicationBuilder. Although it is slightly longer since the checking for existence is broken apart from updating and waiting for sync, this allows some more flexibility for cases where this is necessary. The gitdetails package is left although it has a significantly reduced scope. Since the goal is to allow better reuse of code relating to ZTP, the smaller gitdetails is ultimately beneficial.
klaskosk
added a commit
to klaskosk/eco-gotests
that referenced
this pull request
May 15, 2025
Related to rh-ecosystem-edge/eco-goinfra#1039, this commit refactors the gitopsztp suite to incorporate the new methods introduced for the ApplicationBuilder. Although it is slightly longer since the checking for existence is broken apart from updating and waiting for sync, this allows some more flexibility for cases where this is necessary. The gitdetails package is left although it has a significantly reduced scope. Since the goal is to allow better reuse of code relating to ZTP, the smaller gitdetails is ultimately beneficial.
klaskosk
added a commit
to klaskosk/eco-gotests
that referenced
this pull request
Jul 3, 2025
Related to rh-ecosystem-edge/eco-goinfra#1039, this commit refactors the gitopsztp suite to incorporate the new methods introduced for the ApplicationBuilder. Although it is slightly longer since the checking for existence is broken apart from updating and waiting for sync, this allows some more flexibility for cases where this is necessary. The gitdetails package is left although it has a significantly reduced scope. Since the goal is to allow better reuse of code relating to ZTP, the smaller gitdetails is ultimately beneficial.
klaskosk
added a commit
to klaskosk/eco-gotests
that referenced
this pull request
Jul 8, 2025
Related to rh-ecosystem-edge/eco-goinfra#1039, this commit refactors the gitopsztp suite to incorporate the new methods introduced for the ApplicationBuilder. Although it is slightly longer since the checking for existence is broken apart from updating and waiting for sync, this allows some more flexibility for cases where this is necessary. The gitdetails package is left although it has a significantly reduced scope. Since the goal is to allow better reuse of code relating to ZTP, the smaller gitdetails is ultimately beneficial.
klaskosk
added a commit
to rh-ecosystem-edge/eco-gotests
that referenced
this pull request
Jul 8, 2025
* cnf ran: refactor gitopsztp to use new git methods Related to rh-ecosystem-edge/eco-goinfra#1039, this commit refactors the gitopsztp suite to incorporate the new methods introduced for the ApplicationBuilder. Although it is slightly longer since the checking for existence is broken apart from updating and waiting for sync, this allows some more flexibility for cases where this is necessary. The gitdetails package is left although it has a significantly reduced scope. Since the goal is to allow better reuse of code relating to ZTP, the smaller gitdetails is ultimately beneficial. * cnf ran: fix IBBF labels issue The default is to match all labels in a label filter, so the logic to not run the suite-level BeforeEach for IBBF tests was wrong. This commit fixes it with an equally temporary solution.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As part of an effort to decouple and make reusable the gitdetails helper from cnf/ran in eco-gotests, this PR adds more generic versions of these helpers as methods on the Application builder itself.
WithGitPathAppended is a more specific version of WithGitDetails that is more aligned with the common use case of updating to use a subdirectory of the git repo. WithGitDetails may still be used to update all of the git details if necessary.
DoesGitPathExist can be called similar to WithGitPathAppended and checks if that path would exist. The way it checks should be mostly portable between git hosts, at least enough to cover the common cases.
WaitForSourceUpdate allows verifying a change to the Application's source has taken effect.