-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Converge local and cloud gorelease scripts, improve release notes #4537
Conversation
Skipping CI for Draft Pull Request. |
2699944
to
ff7ea61
Compare
@@ -141,7 +141,7 @@ go mod edit -require=sigs.k8s.io/kustomize/kyaml@$versionKyaml plugin/builtin/pa | |||
|
|||
Create the PR: | |||
``` | |||
createBranch pinToKyaml "Pin to kyaml $versionKyaml" | |||
createBranch pinToKyaml "Update kyaml to $versionKyaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have always been removing these from the release notes, but these are obviously key dependencies, and it could be helpful to show them explicitly so folks can cross-reference the release notes if needed.
a8a86fd
to
9b8bc00
Compare
9b8bc00
to
e86c479
Compare
|
||
Visit the [release page] and edit the release notes as desired. | ||
You can test the release script locally by running [cloudbuild.sh](cloudbuild.sh) in a container or by installing Cloud Build Local and running [cloudbuild-local.sh](cloudbuild-local.sh). See each of those files for more details on their usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this, but I couldn't figure out how to set the value of $TAG_NAME. Regardless, it seemed to be running the steps correctly and threw the exact error I expected given an empty $TAG_NAME so I think it does work.
EDIT: This comment refers to cloudbuild-local.sh
specifically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should just be the first arg, e.g. ./releasing/cloudbuild-local.sh kyaml/v0.13.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks! I missed the comment at the top of cloudbuild-local.sh.
Now I get the output:
ERROR: build step 3 "goreleaser/goreleaser:v0.179.0" failed: Failed to decrypt "GITHUB_TOKEN" using key "projects/k8s-staging-kustomize/locations/global/keyRings/kust-cloud-key-ring/cryptoKeys/kust-cloud-key-name": googleapi: Error 403: Permission 'cloudkms.cryptoKeyVersions.useToDecrypt' denied on resource 'projects/k8s-staging-kustomize/locations/global/keyRings/kust-cloud-key-ring/cryptoKeys/kust-cloud-key-name' (or it may not exist)., forbidden
which I assume is because I don't have keyring decryption permissions on the google cloud project (as expected), so this LGTM.
# Cloud build should be configured to trigger on tags | ||
# matching: | ||
# # Run this script in the container, where $TAG is the tag to "release" (e.g. kyaml/v0.13.4) | ||
# ./releasing/cloudbuild.sh $TAG --snapshot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question, I did this with ./releasing/cloudbuild.sh kyaml/v0.13.4 --snapshot
, and the output has a bunch of things related to the kustomize module, e.g.
• parsing tag
• DEPRECATED: 'kustomize/v4.5.3' is not SemVer-compatible and may cause other issues in the pipeline, check https://goreleaser.com/deprecations#skipping-semver-validations for more info
and
• github/gitlab/gitea releases
• pre-release for tag kustomize/v4.5.3 set to false
is that expected? I would have expected it to only have output related to the kyaml module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprising indeed, though not a new problem with the script. I discovered and added the GORELEASER_CURRENT_TAG env var to fix this.
# kustomize/v1.2.3 | ||
# cmd/config/v1.2.3 | ||
# ... etc. | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one worked for me!
# | ||
# Usage (from top of repo): | ||
# | ||
# releasing/localbuild.sh TAG [--snapshot] | ||
# releasing/run-goreleaser.sh TAG MODE[build|release] [--snapshot] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question here as https://github.com/kubernetes-sigs/kustomize/pull/4537/files#r836707396
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both resolved by L31 below
@KnVerey: This PR has multiple commits, and the default merge method is: merge. 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. |
@@ -27,7 +27,7 @@ cp releasing/cloudbuild.yaml $config | |||
# Add the --snapshot flag to suppress the | |||
# github release and leave the build output | |||
# in the kustomize/dist directory. | |||
sed -i "s|# - '--snapshot|- '--snapshot|" $config | |||
sed -i "" "s|# - '--snapshot|- '--snapshot|" $config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a linux vs mac sed difference. Both active maintainers currently use macs.
releasing/cloudbuild.yaml
Outdated
args: | ||
- 'cp' | ||
- '$(go env GOROOT)/bin/go' | ||
- '/workspace/bin/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting this error
$ ./releasing/cloudbuild-local.sh kyaml/v0.13.4
...
Step #3: cp: can't stat '$(go env GOROOT)/bin/go': No such file or directory
af7313f
to
9e57ab7
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KnVerey, natasha41575 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:
Approvers can indicate their approval by writing |
/hold |
Re: new release note format
Hopefully this will save us some effort manually identifying PRs! Example:
Re: cloudbuild.sh/localbuild.sh consolidation
The diff of cloudbuild.sh and localbuild.sh on master is:
i.e. the only differences are
release
vsbuild
and the inclusion of the release notes flag.