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

install latest release for ko instead of head of main branch #1333

Merged
merged 2 commits into from
Jan 17, 2022

Conversation

cpanato
Copy link
Member

@cpanato cpanato commented Jan 17, 2022

Summary

Error in the post github action when building the images using ko

LDFLAGS="-X github.com/sigstore/cosign/pkg/version.GitVersion=888b392-dirty -X github.com/sigstore/cosign/pkg/version.gitCommit=888b39200d1ae4319aa7c6d6c3b5102abf8871ed -X github.com/sigstore/cosign/pkg/version.gitTreeState="dirty" -X github.com/sigstore/cosign/pkg/version.buildDate='2022-01-15T22:28:40Z'" GIT_HASH=888b39200d1ae4319aa7c6d6c3b5102abf8871ed GIT_VERSION=888b392-dirty \
ko publish --base-import-paths --bare \
	--platform=all --tags 888b392-dirty --tags 888b39200d1ae4319aa7c6d6c3b5102abf8871ed \
	github.com/sigstore/cosign/cmd/cosign
2022/01/15 22:33:50 Using base gcr.io/distroless/base:debug-nonroot for github.com/sigstore/cosign/cmd/cosign
2022/01/15 22:33:51 Using build config cosign for github.com/sigstore/cosign/cmd/cosign
2022/01/15 22:33:51 Building github.com/sigstore/cosign/cmd/cosign for linux/ppc64le
2022/01/15 22:33:51 Using build config cosign for github.com/sigstore/cosign/cmd/cosign
2022/01/15 22:33:51 Building github.com/sigstore/cosign/cmd/cosign for linux/amd64
2022/01/15 22:33:53 Unexpected error running "go build": exit status 1
Error: ../../../go/pkg/mod/github.com/sigstore/rekor@v0.4.1-0.20220114213500-23f583409af3/pkg/pki/pgp/pgp.go:27:2: missing go.sum entry needed to verify package github.com/go-playground/validator/v10 (imported by github.com/sigstore/rekor/pkg/util) is provided by exactly one module; to add:
	go get github.com/sigstore/rekor/pkg/util@v0.4.1-0.20220114213500-23f583409af3
Error: ../../../go/pkg/mod/k8s.io/apimachinery@v0.23.1/pkg/util/json/json.go:24:2: missing go.sum entry for module providing package sigs.k8s.io/json (imported by k8s.io/apimachinery/pkg/util/json); to add:
	go get k8s.io/apimachinery/pkg/util/json@v0.23.1
2022/01/15 22:33:53 Unexpected error running "go build": signal: killed
2022/01/15 22:33:54 Using build config cosign for github.com/sigstore/cosign/cmd/cosign
2022/01/15 22:33:54 Building github.com/sigstore/cosign/cmd/cosign for linux/arm
2022/01/15 22:33:54 Unexpected error running "go build": context canceled
Error: failed to publish images: error building "ko://github.com/sigstore/cosign/cmd/cosign": exit status 1
2022/01/15 22:33:54 error during command execution:failed to publish images: error building "ko://github.com/sigstore/cosign/cmd/cosign": exit status 1
make: *** [Makefile:129: ko] Error 1
Error: Process completed with exit code 2.

installing the latest release of ko instead of the head of main fixed, so looks like there are some issues with ko

ran the job in a fork and it is building: https://github.com/cpanato/cosign/runs/4838052902?check_suite_focus=true

Ticket Link

n/a

Release Note

NONE

@cpanato cpanato requested a review from dlorenc January 17, 2022 08:42
@cpanato cpanato requested a review from dlorenc January 17, 2022 08:51
@@ -28,6 +28,10 @@ jobs:
name: build
runs-on: ubuntu-latest

permissions:
Copy link
Member Author

Choose a reason for hiding this comment

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

the previous pr failed https://github.com/sigstore/cosign/runs/4838213182?check_suite_focus=true

Run google-github-actions/auth@c6c22902f6af237edb96ede5f25a00e864589b2f
Error: google-github-actions/auth failed with: gitHub Actions did not inject $ACTIONS_ID_TOKEN_REQUEST_TOKEN or $ACTIONS_ID_TOKEN_REQUEST_URL into this job. This most likely means the GitHub Actions workflow permissions are incorrect, or this job is being run from a fork. For more information, please see https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

and checking was missing to set some permissions

Signed-off-by: Carlos Panato <ctadeu@gmail.com>
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
@dlorenc dlorenc merged commit b0848d1 into sigstore:main Jan 17, 2022
@github-actions github-actions bot added this to the v1.5.0 milestone Jan 17, 2022
@cpanato cpanato deleted the ko-build-job branch January 17, 2022 09:46
mlieberman85 pushed a commit to mlieberman85/cosign that referenced this pull request May 6, 2022
…e#1333)

* install latest release for ko instead of head of main branch

Signed-off-by: Carlos Panato <ctadeu@gmail.com>

* add missing permissions

Signed-off-by: Carlos Panato <ctadeu@gmail.com>
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.

None yet

2 participants