-
Notifications
You must be signed in to change notification settings - Fork 1k
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 tag default is incorrect #3836
Comments
Is the commit hash from the actual source even when it ends up setting .source to https://github.com/linuxkit/linuxkit? |
Yes it is. The logic for getting the hash works correctly. The logic for getting the repo canonical address is much more limited for the reasons listed above. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Every container image built by
lkt pkg build
adds a few standard tags in the config, including git commit, etc.One of those tags is
org.opencontainers.image.source
.lkt pkg build
uses the following logic:build.yaml
, use thathttps://github.com/linuxkit/linuxkit
Given how much
lkt pkg build
determines from the git dir (tree hash, commit, tag if any, etc.), it should be able to determine the source as well as the commit, and not just fall back tohttps://github.com/linuxkit/linuxkit
every time.The problem is, how do you determine it?
git remote
doesn't quite give it to you, as it includes not just the canonical URL, but the access mode. Should it begit+ssh
? Or maybe[email protected]:foo/bar.git
? Or the (more canonical)https://github.com/foo/bar
? Orhttps://github.com/foo/bar.git
? How would we determine it? Rules forgithub
conversions may not be the same as for gitlab as for some private git repo as for Atlassian bitbucket as, etc.Further, people can use their own aliases for the hostname to change logins for various repos, so
[email protected]:foo/bar
might actually be the exact same repo as[email protected]:foo/bar
, which ishttps://github.com/foo/bar
.How would we resolve it?
I am looking for sane approaches that don't cause too much surprise. My current leanings are towards:
build.yaml
, take it as is (current override)upstream
? Use that; elseorigin
? Use that; elseAs for interpreting the URL:
http
URL? use it as isgit
URL?I know this doesn't cover everything, but seems reasonable to start. It should be a reasonable improvement.
The text was updated successfully, but these errors were encountered: