-
Notifications
You must be signed in to change notification settings - Fork 63
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
Option to traverse up the directory hierarchy looking for secrets.yml #122
Comments
Hi Marco! Thank you for reaching out with your suggestion. We're always looking for ways to improve the user experience and this is a solid idea. For this use case, we think the best solution would be as follows:
The last two flags should be mutually exclusive, and could possibly be implemented using If you intend to implement one of these, your commits should include the --signoff flag (https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s) to certify that you have the rights to submit the work under the same license as the project and you agree to a Developer Certificate of Origin (see http://developercertificate.org/ for more information). |
I went ahead and worked on this a little, and have a mostly finished change on The only thing it needs is a check for reaching the end of the search to avoid infinite looping, |
Hello Bradley,
EDIT Ahah, you were faster than me :-) |
Hello @BradleyBoutcher, for my understanding, how do you see the next steps? |
Hi @marco-m, sorry I didn't see this comment sooner! Per your comment, I'm more than happy deferring to you for implementing the feature to meet your needs, and can review it as needed. You're welcome to pick up my branch or work on things independently, whatever you see fit. For the design, I do think that |
Released! https://github.com/cyberark/summon/releases/tag/v0.8.2 |
@marco-m sorry this took us a bit to release - in the future, feel free to log an issue requesting a release if you need one sooner. that will help us to get it scheduled. thanks again for adding this! it's a really nice addition to the tool :) |
Imagine having a project with a top-level
secrets.yml
file and being deep inside the directory hierarchy when usingsummon
. Imagine also, like in a terraform project, that there are multiple directories from where it makes sense to invokesummon
to have access to secrets.For example: project layout
If I am doing work in directory
tf/dev/user-alice
, the invocation will beIf I change directory level, I will have to keep adjusting the relative
../..
path to locatesecrets.yml
.To avoid all this, the proposal is to add a new option
-u
to traverse up the directory hierarchy, until it finds the firstsecrets.yml
:in this case, summon will go up 3 times until it finds
~/myproject/secrets.yml
:-)If this proposal is accepted, I will be happy to provide a PR.
I took inspiration for this behavior from the build tool scons; the
-u
option is explained in the scons manual page.The text was updated successfully, but these errors were encountered: