-
Notifications
You must be signed in to change notification settings - Fork 5
Add git-crypt wrapper
#195
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
base: trunk
Are you sure you want to change the base?
Conversation
As well as Dockerfile to build the image (In a future commit we shall make the CI push the docker image on our AWS ECR public registry and point to it instead of building it locally)
And fix path used in git filters to rely on $PATH resolution so that it works in both situations of being needed by git from inside and outside the container
Generated by 🚫 Danger |
And remove `auto-unlock` magic command after all, because if we end up pre-installing `git-crypt` on our CI agents (Mac machines, custom AMIs…) and put it at the head of `$PATH` and would take priority (as the helpers from this Buildkite plugin are added at the tail of $PATH), we won't risk client repos that were previously calling `git-crypt auto-unlock` from that helper would suddenly fail.
2d3483a to
e79b4e5
Compare
| Indeed, while `git-crypt` is easy to install on macOS platforms via a simple `brew install git-crypt`, it is not always as easy to install on all other platforms: | ||
| - While some Linux distributions may have versions of `git-crypt` available via `yum install`/`dnf install`/`apk add`/…, they might not always have the latest version. | ||
| - Support for `git-crypt` on Windows platforms is at its infancy, less tested and harder to compile on that platform to begin with. |
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.
Thanks for the explanation 👍
|
I believe the test failure on CI is unrelated to this PR and might instead be related to our recent changes to those scripts, or how the test tries to source those scripts for testing (especially as @mokagio Care to take a look to fix that unrelated part (in a separate PR)? |
What?
This PR adds
bin/git-crypthelper which is a wrapper to callgit-cryptvia docker.bin/are added at the end of$PATH, this means that ifgit-cryptis pre-installed in the agent your job runs (e.g. if we ever include it in our Mac agents or custom AMIs), that pre-installedgit-cryptwill take priority over that helper provided by theci-toolkit.git-cryptis not available elsewhere in the path will callinggit-cryptbe resolved to this helper at the end of the$PATH, which will wrap the call indocker runappropriatelyAdded
git-crypt/*files and WIPThis PR also adds
git-crypt/Dockerfileand its accompanyinggit-crypt/README.mdto rebuild the docker image when necessary and document the process.Currently this
Dockerfileis used todocker buildthe docker image on demand every time, because that docker image hasn't been pushed to a registry yet.🚧 In a future commit we shall make the CI build and push the docker image to our AWS ECR public registry (then update
docker_imagevariable in the script to point to it), so that the image is not rebuild from scratch on every job.TODO
CHANGELOG.mdif necessary.