-
Notifications
You must be signed in to change notification settings - Fork 31
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
GIT not being recognised inside docker build inside gitlab #38
Comments
This is (as I now realize) undocumented, but expected behavior: Lines 421 to 429 in c7b082b
|
Okay... I understand why it doesn't work... But now I ask why it works in my another project that runs in very similar conditions (same gitlab ci and almost identical stage config)? And why when I call |
Probably because the other repo has a shorter commit history and its root is within the commit-depth that GitLab's CI will check out. You may be able to tell GitLab's CI to do a full (non-shallow) checkout. |
Gitlab set the depth to 50 by default and what you said is not the case. The other project is older and contains a lot more commits. This project is new and probably doesn't even have the 50 commits to limit the depth |
Then I don't know. |
Hi,
I couldn't find the reason but I have a project that the GIT consts are all set to none when built inside gitlab ci.
I run the build in a
rust:alpine
based image.I've tried to print out all the info I could and couldn't find any reason for it to fail:
.git
directory was in the root folderbuilt
and it is indeed setting the git consts toNone
git2
dependency as a build dependency and calledRepository::discover(&Path::new(env!("CARGO_MANIFEST_DIR")))
to see if it was failing but it was returning Ok(repo).I have another project that has a simpler structure that everything works as expected. So I imagined it could be something related to my project structure, but I have no idea what could it be.
The text was updated successfully, but these errors were encountered: