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

Use goreleaser to build binaries #601

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

justinsb
Copy link
Member

@justinsb justinsb commented Sep 7, 2023

Continuing the idea of a parallel simpler build, leveraging goreleaser

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 7, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: justinsb
Once this PR has been reviewed and has the lgtm label, please assign jingxu97 for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

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 added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Sep 7, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If the repository mantainers determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 7, 2023
set -e
set -x

source $(git rev-parse --show-toplevel)/tools/common
Copy link
Member Author

Choose a reason for hiding this comment

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

This assumes #599 , I've split it out for now

.goreleaser.yaml Outdated
- main: ./cmd/gke-gcloud-auth-plugin
id: gke-gcloud-auth-plugin
no_unique_dist_dir: true
binary: gke-gcloud-auth-plugin/{{.Os}}-{{.Arch}}/{{.Tag}}/gke-gcloud-auth-plugin
Copy link
Member Author

Choose a reason for hiding this comment

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

These paths are surprising, but I'm trying to mirror the current GCS structure.

I would have thought that this structure would be more logical:

{{.Tag}}/{{.Os}}-{{.Arch}}/gke-gcloud-auth-plugin

or

gke-gcloud-auth-plugin/{{.Tag}}/{{.Os}}-{{.Arch}}/gke-gcloud-auth-plugin

But in general the current structure implies to me that we're tagging the different architectures separately, which is ... not what we're doing.

Copy link
Member

Choose a reason for hiding this comment

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

@ndixita @BenTheElder do you remember why we ended with these structures?

Copy link
Member

Choose a reason for hiding this comment

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

I think they were just trying to get something hosted. I don't have strong opinions other than they should be predictable and uniquely identifiable

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm going to switch to something that is more conventional: project name (because we want to think of these as separate projects, even though they share a repo), then tag, then architecture.

The current staging buckets are basically broken anyway, they upload the binaries named by SHA, which I don't think work with our promotion tools or any tools I've seen in the ecosystem.

@aojea
Copy link
Member

aojea commented Sep 15, 2023

Justin ping me once you need reviews

@justinsb justinsb force-pushed the with_gorelease branch 2 times, most recently from 67a4cb4 to a97e20f Compare January 18, 2024 17:45
@justinsb justinsb changed the title WIP: Use goreleaser to build binaries Use goreleaser to build binaries Jan 18, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 18, 2024
@justinsb
Copy link
Member Author

In the interests of cleaning things up as we go, I switched to follow the more conventional file paths. I don't think it's breaking because I think today's file paths are incompatible with our promotion tools anyway.

This doesn't actually do the upload anyway, so I'd argue it's purely additive.

Want to take another look @aojea ?

Similar to adopting ko for images, we set up a parallel build to the
bazel build, with the intention of using that with the normal OSS
"push-to-staging and promote" workflow.
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 17, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants