-
Notifications
You must be signed in to change notification settings - Fork 28
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
When run in docker, all but sha1 is null #46
Comments
This is biting us too after switching from Travis CI to GitLab CI
|
After digging into this a bit, I found that it has to do with missing directories in the Lines 294 to 297 in 0ad56e5
After a fresh clone, I find that these are not created though. See here about unpacking all objects https://stackoverflow.com/a/16972155/1037938 This appears to not be specific to Docker as these directories do not exist with a fresh clone in MacOS either. |
Hmm, thank you for digging into that @aaemnnosttv! Do you have repro steps that I could use to fix (e.g. clone this repo, using git v2.x.x, git-repo-info is unable to read XYZ value)? |
I don't have that at the moment @rwjblue but I'll try to provide it if you need it. As far as I can tell, you should be able to reproduce it with a fresh clone of any repo. As mentioned above, only the commit sha (full and short) and git paths are are available in the result from the command in this state. Specifically, all other commit data such as commit message, dates, author, etc are not present because the commit objects are not unpacked to read from. |
I had the same problem when building my project in GitLab CI. When repos are cloned, the Solved it by first moving the See SO answer on How to unpack all objects of a git repository? So my
Not sure whether |
I have the same issue when running on Jenkins. checkout([
$class: 'GitSCM',
branches: scm.branches,
doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations,
extensions: [[$class: 'CloneOption', noTags: false, shallow: false, depth: 0, reference: '']],
userRemoteConfigs: scm.userRemoteConfigs
]) Then later, I checkout a specific tag with |
As a workaround, we changed our repository to use |
When I run this inside of docker, the sha1 is visible, but the others are null.
Docker file is
FROM alpine:latest
and then basically
The text was updated successfully, but these errors were encountered: