-
Notifications
You must be signed in to change notification settings - Fork 699
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
No .git directory in source dir #457
Comments
yes, s2i presently explicitly excludes the .git directory. This has come up a couple times (not sure if we have another issue open for it @mfojtik @gabemontero ?) I think we should do one of two things:
I think (1) is my preference. |
@bparees +1 for 1) |
To the historical angle @bparees alluded to, the closest thing to this that I worked was #367, where we added the force copy option to preserve empty directories. I haven't tried it yet, but It is conceivable that could prove to be a workaround for preserving the .git directory as well (with of course requiring that you clone the repo before running I'll see where the exclusion of .git occurs in the code and/or attempt it myself, unless @MartinRumanek or someone beats me to trying it. Based on the results, let's revisit whether we still want to do (1). |
the exclusion logic happens during the tarring for sending into the container, so i'm 99% confident it'll take effect regardless of the copy/clone strategy. |
ok thx for the quick intel @bparees - i'll start on the new option |
In looking at the code, there is already a setter for the regular expression used to exclude files, where the default regex covers the .git's. So I'm thinking the new flag should be a bit more generic, and simple expose the regexp used for tar filtering, where the user can set it to an empty string in order to allow anything (including the .git's), or filter additional files besides .git, etc. Thoughts? |
sounds reasonable to me. |
See e.g. openshift/source-to-image#457 Thankfully, OpenShift *will* do a recursive clone, so we don't need to handle that. Closes: #27
See e.g. openshift/source-to-image#457 Thankfully, OpenShift *will* do a recursive clone, so we don't need to handle that. Closes: #27
See e.g. openshift/source-to-image#457 Thankfully, OpenShift *will* do a recursive clone, so we don't need to handle that. Closes: #27
My assemble script expects git repo (because my gradle build calls some git commands), not only the source code (without a .git directory).
I've tried command build with param "--save-temp-dir=true"
and the path /tmp/s2i269878825/upload/src is ok (with .git directory), but inside the builder image directory .git doesn't exist.
The text was updated successfully, but these errors were encountered: