Skip to content
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

Provide option for s2i to ignore .git and use local directory. #418

Closed
GrahamDumpleton opened this issue Feb 29, 2016 · 9 comments
Closed

Comments

@GrahamDumpleton
Copy link

As far as I can tell, if you point s2i at a directory which is a git checkout, it always goes and checks out head of default branch from the git repository and ignores the source code in the current local directory. I cannot see an option which says don't go do that.

If that is the case, can we have a --no-git or --no-vcs option so that it will always use the file system directory it is told to use. It is a bit of a pain to have to copy a git checkout directory to another location and remove the .git directory just to make it work wth local sources.

If there is an option and I am blind, or there is some other way of doing this which doesn't entail making copies of everything, can you let me know.

@bparees
Copy link
Contributor

bparees commented Feb 29, 2016

s2i build --ref=foo

but that still requires you have an actual commit you want to use, and not
uncommitted code.

On Mon, Feb 29, 2016 at 4:55 AM, Graham Dumpleton [email protected]
wrote:

As far as I can tell, if you point s2i at a directory which is a git
checkout, it always goes and checks out head of default branch from the git
repository and ignores the source code in the current local directory. I
cannot see an option which says don't go do that.

If that is the case, can be have a --no-git or --no-vcs option so that it
will always use the file system directory it is told to use. It is a bit of
a pain to have to copy a git checkout directory to another location and
remove the .git directory just to make it work wth local sources.

If there is an option and I am blind, or there is some other way of doing
this, can you let me know.


Reply to this email directly or view it on GitHub
#418.

Ben Parees | OpenShift

@GrahamDumpleton
Copy link
Author

I want it simply to be everything in the directory, regardless of whether committed or not, or even if added to git for it to track.

FWIW, where I used to work I had a middle ground for a system I had for running tests. I didn't want everything in the directory to be added as there could be lots of temporary crap. Instead I wrote up a system which would take what was committed, plus what had been added to the git index but not yet committed. This allowed me to specify what local changes were picked up but without creating a horrible commit history that I would have to rebase to get rid of before pushing. Not asking for this variation here though.

@bparees
Copy link
Contributor

bparees commented Feb 29, 2016

yup, i got it and it makes sense.

@bparees
Copy link
Contributor

bparees commented Apr 8, 2016

I think maybe this will have fixed your issue?
#428

if you specify --copy we'll do a filesystem copy instead of a git clone, so that should get the current content. can you give it a shot and confirm?

@bparees bparees self-assigned this Apr 8, 2016
@GrahamDumpleton
Copy link
Author

I can't verify this until a release is made as not been building binaries myself.

@bparees
Copy link
Contributor

bparees commented Apr 11, 2016

i'll try to cut a release today.

@bparees
Copy link
Contributor

bparees commented Apr 11, 2016

@bparees
Copy link
Contributor

bparees commented Apr 21, 2016

@GrahamDumpleton bump

@GrahamDumpleton
Copy link
Author

Confirmed that --copy appears to work as anticipated in 1.0.6.

vorburger added a commit to vorburger/s2i-java-example that referenced this issue Mar 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants