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 skopeo to managed utilities #1915

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Add skopeo to managed utilities #1915

merged 1 commit into from
Jun 6, 2024

Conversation

wagoodman
Copy link
Contributor

When trouble shooting an issue in another PR https://github.com/hibare/grype/actions/runs/9402939074/job/25898220305 I found that there were utilities being referenced in legacy locations. It seems that skopeo was missed when porting the tool management approach and the cache was busted, revealing the issue:

task: [integration] go test -v ./test/integration
=== RUN   TestCompareSBOMInputToLibResults
    utils_test.go:42: Cache miss for image anchore/test_images:vulnerabilities-alpine; copying to archive at /home/runner/work/grype/grype/test/integration/test-fixtures/cache/anchore-test_images-vulnerabilities-alpine.tar
    utils_test.go:68: fork/exec /home/runner/work/grype/grype/.tmp/skopeo: no such file or directory

This PR adds skopeo as a managed tool and updates the test util code to reference the new location.

@wagoodman wagoodman requested a review from a team June 6, 2024 15:00
@wagoodman wagoodman enabled auto-merge (squash) June 6, 2024 15:00
@wagoodman wagoodman added the changelog-ignore Don't include this issue in the release changelog label Jun 6, 2024
spiffcs
spiffcs previously approved these changes Jun 6, 2024
@spiffcs spiffcs dismissed their stale review June 6, 2024 15:02

missclick

@spiffcs
Copy link
Contributor

spiffcs commented Jun 6, 2024

@wagoodman it looks like installing skopeo this way leads to a bootstrap error - Their install process seems to be a bit more complex than just running go install

Install/Build skopeo from Source

@wagoodman
Copy link
Contributor Author

I think I need to set:

CGO_ENABLED=0 GO_DYN_FLAGS=""

I'll get a binny enhancement going to allow for env vars

@wagoodman wagoodman marked this pull request as draft June 6, 2024 15:51
auto-merge was automatically disabled June 6, 2024 15:51

Pull request was converted to draft

@wagoodman wagoodman marked this pull request as ready for review June 6, 2024 18:42
@wagoodman wagoodman enabled auto-merge (squash) June 6, 2024 18:43
@wagoodman wagoodman merged commit e5b341b into main Jun 6, 2024
10 checks passed
@wagoodman wagoodman deleted the add-skopeo branch June 6, 2024 18:58
pouyan021 pushed a commit to pouyan021/grype that referenced this pull request Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-ignore Don't include this issue in the release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants