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

Container image builds don't work with git worktrees #2052

Closed
tnozicka opened this issue Aug 2, 2024 · 0 comments · Fixed by #2053
Closed

Container image builds don't work with git worktrees #2052

tnozicka opened this issue Aug 2, 2024 · 0 comments · Fixed by #2053
Assignees
Labels
kind/machinery Categorizes issue or PR as related to Makefile, scripts or similar changes. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@tnozicka
Copy link
Contributor

tnozicka commented Aug 2, 2024

When you set up a git worktree the .git folder is something like a "symlink" to the original directory

git worktree list
/home/tnozicka/dev/go/src/github.com/scylladb/scylla-operator    db74ccf1b [fix-openshift]
/home/tnozicka/dev/go/src/github.com/scylladb/scylla-operator-1  32f8fa4d6 [git-worktrees]
$ cat /home/tnozicka/dev/go/src/github.com/scylladb/scylla-operator/.git
cat: /home/tnozicka/dev/go/src/github.com/scylladb/scylla-operator/.git: Is a directory

$ cat /home/tnozicka/dev/go/src/github.com/scylladb/scylla-operator-1/.git
gitdir: /home/tnozicka/dev/go/src/github.com/scylladb/scylla-operator/.git/worktrees/scylla-operator-1

Without containerization that works fine but container image builds require a build context and the tar only the local "scylla-operator-1" directory which contains only the .git "symlinks" which lacks the source in the build container.

We should allow builds from source code without git in general and fix this as well.

@tnozicka tnozicka added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. kind/machinery Categorizes issue or PR as related to Makefile, scripts or similar changes. labels Aug 2, 2024
@tnozicka tnozicka self-assigned this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/machinery Categorizes issue or PR as related to Makefile, scripts or similar changes. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant