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

Fix kpromo version in cloudbuild job #848

Merged
merged 1 commit into from
May 2, 2023

Conversation

saschagrunert
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

git files are exuded by default in Google Cloud build, which means that we have no kpromo GitVersion/GitCommitavailable in:

> podman run -it registry.k8s.io/artifact-promoter/kpromo:v3.5.2-0 version
  _  __  ____    ____     ___    __  __    ___
 | |/ / |  _ \  |  _ \   / _ \  |  \/  |  / _ \
 | ' /  | |_) | | |_) | | | | | | |\/| | | | | |
 | . \  |  __/  |  _ <  | |_| | | |  | | | |_| |
 |_|\_\ |_|     |_| \_\  \___/  |_|  |_|  \___/
kpromo: Kubernetes project artifact promoter

GitVersion:
GitCommit:
GitTreeState:  clean
BuildDate:     2023-04-05T20:43:02Z
GoVersion:     go1.19.8
Compiler:      gc
Platform:      linux/amd64

Means we also have this information not available in the signatures:

> cosign verify \
    --certificate-identity krel-trust@k8s-releng-prod.iam.gserviceaccount.com \
    --certificate-oidc-issuer https://accounts.google.com \
    registry.k8s.io/security-profiles-operator/security-profiles-operator:v0.8.0 | jq '.[0].optional."org.kubernetes.kpromo.version"'
…
"kpromo-"

This is now fixed by using an empty .gcloudignore file.

This commit also fixes to print the correct build step in the go_with_version script.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Fixed missing kpromo version in container images.

git files are exuded by default in Google Cloud build, which means that
we have no kpromo `GitVersion`/`GitCommit`available in:

```
> podman run -it registry.k8s.io/artifact-promoter/kpromo:v3.5.2-0 version
  _  __  ____    ____     ___    __  __    ___
 | |/ / |  _ \  |  _ \   / _ \  |  \/  |  / _ \
 | ' /  | |_) | | |_) | | | | | | |\/| | | | | |
 | . \  |  __/  |  _ <  | |_| | | |  | | | |_| |
 |_|\_\ |_|     |_| \_\  \___/  |_|  |_|  \___/
kpromo: Kubernetes project artifact promoter

GitVersion:
GitCommit:
GitTreeState:  clean
BuildDate:     2023-04-05T20:43:02Z
GoVersion:     go1.19.8
Compiler:      gc
Platform:      linux/amd64
```

Means we also have this information not available in the signatures:

```
> cosign verify \
    --certificate-identity krel-trust@k8s-releng-prod.iam.gserviceaccount.com \
    --certificate-oidc-issuer https://accounts.google.com \
    registry.k8s.io/security-profiles-operator/security-profiles-operator:v0.8.0 | jq '.[0].optional."org.kubernetes.kpromo.version"'
…
"kpromo-"
```

This is now fixed by using an empty `.gcloudignore` file.

This commit also fixes to print the correct build step in the
`go_with_version` script.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/artifacts Issues or PRs related to the hosting of release artifacts for subprojects labels May 2, 2023
@k8s-ci-robot k8s-ci-robot added area/release-eng Issues or PRs related to the Release Engineering subproject approved Indicates a PR has been approved by an approver from all required OWNERS files. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 2, 2023
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

Thanks

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 2, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [cpanato,saschagrunert]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 036d1d8 into kubernetes-sigs:main May 2, 2023
@saschagrunert saschagrunert deleted the gcloud-ignore branch May 2, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/artifacts Issues or PRs related to the hosting of release artifacts for subprojects area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants