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 kubectl shp for release #180

Closed

Conversation

liangyuanpeng
Copy link
Contributor

@liangyuanpeng liangyuanpeng commented Apr 14, 2023

Changes

  • Change prefix cli to shp for release

  • Add kubectl plugin of shp for release

  • Change replacements to name_template for archive files

Because replacements will be deleted and it's not correctly working for multiple archives.

Ref from goreleaser:
https://goreleaser.com/deprecations/?h=replacements#archivesreplacements

The replacements will be removed soon from the archives section, as it was never handled correctly when multiple archives were being used, and it also causes confusion in other places.

You can still get the same features by abusing the name_template property.

Fixes #179

Related:

Tested

gorelease logs:

• writing effective config file
    • writing                                        config=dist/config.yaml
  • building binaries
    • building                                       binary=dist/shp_linux_arm64/shp
    • building                                       binary=dist/shp_linux_amd64_v1/shp
    • building                                       binary=dist/shp_darwin_amd64_v1/shp
    • building                                       binary=dist/shp_darwin_arm64/shp
    • building                                       binary=dist/shp_windows_amd64_v1/shp.exe
    • building                                       binary=dist/shp_windows_arm64/shp.exe
    • building                                       binary=dist/kubectl-shp_linux_amd64_v1/kubectl-shp
    • building                                       binary=dist/kubectl-shp_linux_arm64/kubectl-shp
    • building                                       binary=dist/kubectl-shp_darwin_amd64_v1/kubectl-shp
    • building                                       binary=dist/kubectl-shp_darwin_arm64/kubectl-shp
    • building                                       binary=dist/kubectl-shp_windows_amd64_v1/kubectl-shp.exe
    • building                                       binary=dist/kubectl-shp_windows_arm64/kubectl-shp.exe
    • took: 11m27s
  • generating changelog
  • archives
    • creating                                       archive=dist/shp_v0.99.0_linux_arm64.tar.gz
    • creating                                       archive=dist/shp_v0.99.0_linux_x86_64.tar.gz
    • creating                                       archive=dist/shp_v0.99.0_macOS_x86_64.tar.gz
    • creating                                       archive=dist/shp_v0.99.0_macOS_arm64.tar.gz
    • creating                                       archive=dist/shp_v0.99.0_windows_arm64.tar.gz
    • creating                                       archive=dist/shp_v0.99.0_windows_x86_64.tar.gz
    • creating                                       archive=dist/kubectl-shp_v0.99.0_windows_arm64.tar.gz
    • creating                                       archive=dist/kubectl-shp_v0.99.0_linux_x86_64.tar.gz
    • creating                                       archive=dist/kubectl-shp_v0.99.0_linux_arm64.tar.gz
    • creating                                       archive=dist/kubectl-shp_v0.99.0_macOS_x86_64.tar.gz
    • creating                                       archive=dist/kubectl-shp_v0.99.0_macOS_arm64.tar.gz
    • creating                                       archive=dist/kubectl-shp_v0.99.0_windows_x86_64.tar.gz
    • took: 39s
  • calculating checksums
  • publishing
    • scm releases
      • creating or updating release                 repo=liangyuanpeng/shipwright-cli tag=v0.99.0
      • release updated                              name=v0.99.0 release-id=99490864 request-id=2[34](https://github.com/liangyuanpeng/shipwright-cli/actions/runs/4696180341/jobs/8326032835#step:5:35)0:450B:2DB4B57:2EEA3BB:6438D0D6
      • uploading to release                         file=dist/shp_v0.99.0_linux_arm64.tar.gz name=shp_v0.99.0_linux_arm64.tar.gz
      • uploading to release                         file=dist/shp_v0.99.0_linux_x86_64.tar.gz name=shp_v0.99.0_linux_x86_64.tar.gz
      • uploading to release                         file=dist/shp_v0.99.0_macOS_arm64.tar.gz name=shp_v0.99.0_macOS_arm64.tar.gz
      • uploading to release                         file=dist/shp_v0.99.0_macOS_x86_64.tar.gz name=shp_v0.99.0_macOS_x86_64.tar.gz
      • uploading to release                         file=dist/shp_v0.99.0_windows_arm64.tar.gz name=shp_v0.99.0_windows_arm64.tar.gz
      • uploading to release                         file=dist/shp_v0.99.0_windows_x86_64.tar.gz name=shp_v0.99.0_windows_x86_64.tar.gz
      • uploading to release                         file=dist/kubectl-shp_v0.99.0_windows_arm64.tar.gz name=kubectl-shp_v0.99.0_windows_arm64.tar.gz
      • uploading to release                         file=dist/kubectl-shp_v0.99.0_linux_x86_64.tar.gz name=kubectl-shp_v0.99.0_linux_x86_64.tar.gz
      • uploading to release                         file=dist/kubectl-shp_v0.99.0_linux_arm64.tar.gz name=kubectl-shp_v0.99.0_linux_arm64.tar.gz
      • uploading to release                         file=dist/kubectl-shp_v0.99.0_macOS_x86_64.tar.gz name=kubectl-shp_v0.99.0_macOS_x86_64.tar.gz
      • uploading to release                         file=dist/kubectl-shp_v0.99.0_macOS_arm64.tar.gz name=kubectl-shp_v0.99.0_macOS_arm64.tar.gz
      • uploading to release                         file=dist/kubectl-shp_v0.99.0_windows_x86_64.tar.gz name=kubectl-shp_v0.99.0_windows_x86_64.tar.gz
      • uploading to release                         file=dist/checksums.txt name=checksums.txt
      • published                                    url=https://github.com/liangyuanpeng/shipwright-cli/releases/tag/v0.99.0
      • took: 11s

More info at https://github.com/liangyuanpeng/shipwright-cli/actions/runs/4696180341/jobs/8326032835

image

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

Maybe should be add release note after finished for krew?

Release kubectl shp binary

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none labels Apr 14, 2023
@qu1queee
Copy link
Contributor

From the SHP Grooming session, @liangyuanpeng is this PR ready for review? per the [WIP].

@liangyuanpeng liangyuanpeng changed the title [WIP] Add kubectl shp for release Add kubectl shp for release Apr 20, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 20, 2023
@liangyuanpeng
Copy link
Contributor Author

liangyuanpeng commented Apr 20, 2023

@qu1queee Thanks for your remind , I think it's ready for review.

Will be working for submitting plugins to krew and automating release it ,after kubectl shp released.

@otaviof
Copy link
Member

otaviof commented Apr 21, 2023

/lgtm

Thanks for the contribution, @liangyuanpeng! 🙇‍♀️

/assign @SaschaSchwarze0
/cc @akram

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 21, 2023

@otaviof: GitHub didn't allow me to request PR reviews from the following users: akram.

Note that only shipwright-io members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/lgtm

Thanks for the contribution, @liangyuanpeng! 🙇‍♀️

/assign @SaschaSchwarze0
/cc @akram

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.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 21, 2023
Copy link
Contributor

@HeavyWombat HeavyWombat left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. It is looking good. Would be nice to rearrange the fields to have id first and to make sure we use consistent indentation. And thanks for looking into a replacement for the deprecated replacements field.

.goreleaser.yml Outdated
Comment on lines 22 to 37
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
flags:
- -trimpath
ldflags:
- -s -w -extldflags "-static" -X github.com/shipwright-io/cli/pkg/shp/cmd/version.version={{.Version}}
main: ./cmd/shp/main.go
binary: kubectl-shp
id: kubectl-shp
Copy link
Contributor

Choose a reason for hiding this comment

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

Just some thoughts here: The id should come first in my opinion as it severs mostly as an internal identifier and makes for better readability to start the list entry with its identifier.

Also, the new entry used a different indentation compared to the old one. It does not matter technically, but I think we should try to keep the same style within one YAML file.

Suggested change
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
flags:
- -trimpath
ldflags:
- -s -w -extldflags "-static" -X github.com/shipwright-io/cli/pkg/shp/cmd/version.version={{.Version}}
main: ./cmd/shp/main.go
binary: kubectl-shp
id: kubectl-shp
- id: kubectl-shp
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
flags:
- -trimpath
ldflags:
- -s -w -extldflags "-static" -X github.com/shipwright-io/cli/pkg/shp/cmd/version.version={{.Version}}
main: ./cmd/shp/main.go
binary: kubectl-shp

Copy link
Contributor

Choose a reason for hiding this comment

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

@HeavyWombat can u re-review pls?

Change prefix cli to shp for release

Signed-off-by: Lan Liang <[email protected]>
@liangyuanpeng liangyuanpeng force-pushed the add_release_kubectlshp branch from 57f6af2 to b496548 Compare May 17, 2023 09:36
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 17, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 17, 2023

New changes are detected. LGTM label has been removed.

@liangyuanpeng
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 18, 2023

@liangyuanpeng: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@qu1queee
Copy link
Contributor

@liangyuanpeng from the Shipwright Refinement meeting, can we help you here?

@qu1queee qu1queee requested a review from HeavyWombat October 4, 2023 08:31
@qu1queee
Copy link
Contributor

qu1queee commented Oct 4, 2023

/retest

@qu1queee
Copy link
Contributor

qu1queee commented Oct 4, 2023

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 4, 2023
@HeavyWombat
Copy link
Contributor

Tests have no logs anymore and I cannot re-run them from the GitHub Actions UI. Will try another retry here and if this does not work, I am afraid I have to do a close and reopen.
/honk

@HeavyWombat
Copy link
Contributor

/retest

@HeavyWombat HeavyWombat closed this Oct 4, 2023
@HeavyWombat HeavyWombat reopened this Oct 4, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 4, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 4, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from otaviof. 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

@HeavyWombat
Copy link
Contributor

HeavyWombat commented Oct 4, 2023

@liangyuanpeng Could you have a look into rebasing this PR? The feature branch is behind some 15 commits. Just realized, I think @SaschaSchwarze0 mentioned that he has something in the working that will probably cover the Verify failure. So we need to wait for that fix, too.

@adambkaplan
Copy link
Member

@HeavyWombat checking on the status of this. Should another community member rebase and re-submit this PR?

@HeavyWombat
Copy link
Contributor

@HeavyWombat checking on the status of this. Should another community member rebase and re-submit this PR?

I'll have a look tomorrow.

@adambkaplan
Copy link
Member

Closing this PR as it appears abandoned. Those who wish to contribute to the related feature #102 should submit a new pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

The prefix name of release archive files shoule be shp?
6 participants