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

Add support for recursively resolving directory symlinks. #73

Merged
merged 2 commits into from
Aug 16, 2019

Conversation

mattmoor
Copy link
Collaborator

This adds support for properly resolving directory symlinks within kodata.
I verified that with this I can symlink .git/refs into kodata/ and (with
changes) resolve the .git/HEAD symlink to read the appropriate
ref: refs/heads/... files with the commit SHA.

This adds support for properly resolving directory symlinks within kodata.
I verified that with this I can symlink `.git/refs` into `kodata/` and (with
changes) resolve the `.git/HEAD` symlink to read the appropriate
`ref: refs/heads/...` files with the commit SHA.
mattmoor added a commit to mattmoor/pkg that referenced this pull request Aug 15, 2019
With ko-build/ko#73 we can link the Git ref information
into images with:
```
ln -r -s .git/refs ./cmd/foo/kodata
```

If the changeset package gets a `ref: <ref>` entry, it attempts to read that
file from `KO_DATA_PATH` next, which lets the changeset work much more effectively.
knative-prow-robot pushed a commit to knative/pkg that referenced this pull request Aug 15, 2019
With ko-build/ko#73 we can link the Git ref information
into images with:
```
ln -r -s .git/refs ./cmd/foo/kodata
```

If the changeset package gets a `ref: <ref>` entry, it attempts to read that
file from `KO_DATA_PATH` next, which lets the changeset work much more effectively.
Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to add a directory symlink to cmd/ko/test/kodata?

pkg/build/gobuild.go Show resolved Hide resolved
pkg/build/gobuild.go Outdated Show resolved Hide resolved
pkg/build/gobuild.go Show resolved Hide resolved
pkg/build/gobuild.go Outdated Show resolved Hide resolved
pkg/build/gobuild.go Show resolved Hide resolved
@jonjohnsonjr
Copy link
Collaborator

    --- FAIL: TestGoBuild/check_app_layer_contents (0.00s)
        gobuild_test.go:265: Digest() = sha256:b732ce9d2fe1042fcbee9d3d4682ed06336c65b55cd04462ae4dc26f752e7699, want sha256:4379f30a6c6f66221c3c54dddd378fcfa5a7304a6655ff783b102069c0f943ab

pkg/build/gobuild.go Show resolved Hide resolved
pkg/build/gobuild.go Outdated Show resolved Hide resolved
@mattmoor mattmoor force-pushed the directory-symlinks branch 2 times, most recently from 5d7df96 to 23dca33 Compare August 16, 2019 00:30
@mattmoor mattmoor force-pushed the directory-symlinks branch from 23dca33 to 92e7077 Compare August 16, 2019 00:46
@mattmoor mattmoor merged commit a3656d1 into ko-build:master Aug 16, 2019
@mattmoor mattmoor deleted the directory-symlinks branch August 16, 2019 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants