-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Support for jsonnet-bundler & jsonnet flags (like -J
to include library paths)
#3688
Comments
Did you find a workaround for this @wmcnamee-tunein ? We have a similar issue where our base jsonnet libraries are in different repo (shared by many other repos). Also I got confused by |
@wmcnamee-tunein @gaurav517 I have this working using a plugin. In addition to the plugin I had to add In our case, we're using jb and tanka, and got it to work like this: Dockerfile:
Argo config:
Then you can create an Argo app like this:
I also got this working for private git repos by using HTTPS instead of SSH to authenticate and providing a PAT that had permission to reach both the GitOps repo as well as our jsonnet library repo. |
where does |
@ghostsquad it's set in the Argo
|
@jessebye thanks, ya I totally missed that! :) |
any idea why |
@ghostsquad The idea is that tanka users should use its built-in kubernetes context management, and using See also grafana/tanka#3 |
thank you. This makes sense. |
FWIW: Since @deleted and I had a simple app without pulling in other jsonnet libraries - i.e. no jsonnet lock file. The jb update was failing with
So we just return the appropriate exit code in jb update - i.e.
|
FWIW, |
@jessebye writes:
One thing with jsonnet-bundler/ Is that one of the situations you got working? How? If PAT is a "personal access token", then one way I've got it working with mkdir /tmp/home
set +H # to avoid exclamation point triggering history expansion...
HOME=/tmp/home git config --global credential.helper "!f() { echo \"username=gitlab-ci-token\\npassword=${GITLAB_TOKEN}\"; }; f"
HOME=/tmp/home jb update
rm -rf /tmp/home My vote would be that if jsonnet-bundler should be supported, it needs to support both SSH and HTTPS credentials for dependencies stored as secrets somehow elegantly too. |
Summary
This is a request to support jsonnet-bundler and jsonnet flags like
-J
which adds libraries to the "paths" for whereimport
looks for files.Motivation
My jsonnet files have external library dependencies that I don't want to check into my git repo. I use
jsonnet-bundler
in order to pull down those dependencies locally before calling jsonnet with-J vendor
to automatically look for relevant libraries within the vendor directory.In order to use ArgoCD I would need the same functionality.
Proposal
In an abstract way, it might be nice to support some sort of custom "post-clone"/"pre-sync" job/command.
Such that it might look like:
The text was updated successfully, but these errors were encountered: