diff --git a/build/README.md b/build/README.md deleted file mode 100644 index a8d478eebe..0000000000 --- a/build/README.md +++ /dev/null @@ -1,43 +0,0 @@ -[releases page]: https://github.com/kubernetes-sigs/kustomize/releases -[`cloud-build-local`]: https://github.com/GoogleCloudPlatform/cloud-build-local -[Google Cloud Build]: https://cloud.google.com/cloud-build - -Scripts and configuration files for publishing a -`kustomize` release on the [releases page]. - -### Build a release locally - -Install [`cloud-build-local`], then run - -``` -./build/localbuild.sh -``` - -to build artifacts under `./dist`. - -### Publish a Release - -Get on an up-to-date master branch: -``` -git checkout master -git fetch upstream -git rebase upstream/master -``` - -Define the version (see [semver principles](https://semver.org)), e.g.: -``` -version=v1.0.3 -``` - -Tag the repo: -``` -git tag -a $version -m "$version release" -``` - -Push the tag upstream: -``` -git push upstream $version -``` - -The new tag will trigger a job in [Google Cloud -Build] to put a new release on the [releases page]. diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 4a75431c4e..72b8c526eb 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -1,13 +1,15 @@ [release page]: https://github.com/kubernetes-sigs/kustomize/releases [Go]: https://golang.org -## Installation +# Installation -For linux, macOs and Windows, -download a binary from the -[release page]. +Binaries at various versions for linux, macOs and Windows +are available on the [release page]. + +Or... + +## Quickly curl the latest -Or try this command: ``` opsys=linux # or darwin, or windows curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases/latest |\ @@ -19,7 +21,9 @@ mv kustomize_*_${opsys}_amd64 kustomize chmod u+x kustomize ``` -To install from head with [Go] v1.12 or higher: +## Install from the HEAD of master branch + +Requires [Go] v1.12 or higher: ``` diff --git a/docs/plugins/execPluginGuidedExample.md b/docs/plugins/execPluginGuidedExample.md index 64bf225ace..b264cf59c8 100644 --- a/docs/plugins/execPluginGuidedExample.md +++ b/docs/plugins/execPluginGuidedExample.md @@ -1,6 +1,6 @@ # Exec plugin on linux in 60 seconds -This is a (no reading) 60 second copy/paste guided +This is a (no reading allowed!) 60 second copy/paste guided example. Full plugin docs [here](README.md). This demo writes and uses a somewhat ridiculous diff --git a/docs/plugins/goPluginGuidedExample.md b/docs/plugins/goPluginGuidedExample.md index 88ffefb957..7344f80e3e 100644 --- a/docs/plugins/goPluginGuidedExample.md +++ b/docs/plugins/goPluginGuidedExample.md @@ -1,6 +1,6 @@ # Go Plugin Guided Example for Linux -This is a (no reading) 60 second copy/paste guided +This is a (no reading allowed!) 60 second copy/paste guided example. Full plugin docs [here](README.md). [SopsEncodedSecrets repository]: https://github.com/monopole/sopsencodedsecrets diff --git a/docs/versioningPolicy.md b/docs/versioningPolicy.md index 73a50645bb..e8c4c69291 100644 --- a/docs/versioningPolicy.md +++ b/docs/versioningPolicy.md @@ -235,7 +235,7 @@ moment forward. [special]: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#resources [k8s API]: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md [conventions]: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md -[release process]: ../build/README.md +[release process]: ../releasing/README.md [kustomization]: glossary.md#kustomization [`kind`]: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#types-kinds [`apiVersion`]: https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-versioning diff --git a/releasing/README.md b/releasing/README.md new file mode 100644 index 0000000000..37ab12ebcd --- /dev/null +++ b/releasing/README.md @@ -0,0 +1,87 @@ +# Releasing + +[releases page]: https://github.com/kubernetes-sigs/kustomize/releases +[`cloud-build-local`]: https://github.com/GoogleCloudPlatform/cloud-build-local +[Google Cloud Build]: https://cloud.google.com/cloud-build +[semver]: https://semver.org + +Scripts and configuration files for publishing a +`kustomize` release on the [releases page]. + +## Build a release locally + +Install [`cloud-build-local`], then run + +``` +./releasing/localbuild.sh +``` + +to build artifacts under `./dist`. + +## Do a real (cloud) release + +Get on an up-to-date master branch: +``` +git fetch upstream +git checkout master +git rebase upstream/master +``` + +### review tags + +``` +git tag -l +git ls-remote --tags upstream +``` + +### define the new tag + +Define the version per [semver] principlesl it must start with `v`: + +``` +version=v3.0.0-pre +``` + +### delete the tag if you wish to replace it upstream + +Local delete: + +``` +git tag --delete $version +``` + +Upstream delete: +``` +# Disable push protection: +git remote set-url --push upstream git@github.com:kubernetes-sigs/kustomize.git + +# The empty space before the colon effectively means delete the tag. +git push upstream :refs/tags/$version + +# Enable push protection: +git remote set-url --push upstream no_push +``` + +Optionally visit the [release page] and delete +(what has now become) the _draft_ release for that +version. + +### tag locally + +``` +git tag -a $version -m "Release $version" +``` + +### trigger the cloud build + +Pushing the tag will trigger a job in [Google Cloud +Build] to put a new release on the [releases page]. + +``` +git push upstream $version +``` + +### Update release notes + +Visit the [release page] and edit the release notes as desired. + diff --git a/build/cloudbuild.sh b/releasing/cloudbuild.sh similarity index 97% rename from build/cloudbuild.sh rename to releasing/cloudbuild.sh index 88b701598d..e3eea0c99d 100755 --- a/build/cloudbuild.sh +++ b/releasing/cloudbuild.sh @@ -54,6 +54,6 @@ done /goreleaser \ release \ - --config=build/goreleaser.yaml \ + --config=releasing/goreleaser.yaml \ --rm-dist \ --skip-validate ${SNAPSHOT} diff --git a/build/cloudbuild.yaml b/releasing/cloudbuild.yaml similarity index 91% rename from build/cloudbuild.yaml rename to releasing/cloudbuild.yaml index e98b32e24f..046aa5739e 100644 --- a/build/cloudbuild.yaml +++ b/releasing/cloudbuild.yaml @@ -2,7 +2,7 @@ steps: - name: "gcr.io/cloud-builders/git" args: [fetch, --tags, --depth=100] - name: "gcr.io/kubebuilder/goreleaser_with_go_1.12.5:0.0.1" - args: ["bash", "build/cloudbuild.sh"] + args: ["bash", "releasing/cloudbuild.sh"] secretEnv: ['GITHUB_TOKEN'] secrets: - kmsKeyName: projects/kustomize-199618/locations/global/keyRings/github-tokens/cryptoKeys/gh-release-token diff --git a/build/goreleaser.yaml b/releasing/goreleaser.yaml similarity index 100% rename from build/goreleaser.yaml rename to releasing/goreleaser.yaml diff --git a/build/localbuild.sh b/releasing/localbuild.sh similarity index 91% rename from build/localbuild.sh rename to releasing/localbuild.sh index cd1adb282e..3deb5765d0 100755 --- a/build/localbuild.sh +++ b/releasing/localbuild.sh @@ -2,7 +2,7 @@ # Usage # -# ./build/localbuild.sh +# ./releasing/localbuild.sh # # The script attempts to use cloudbuild configuration # to create a release "locally". @@ -17,11 +17,11 @@ # applied to the kustomize repo, the cloud builder # reads the repository-relative file # -# build/cloudbuild.yaml +# releasing/cloudbuild.yaml # # Inside this yaml file is a reference to the script # -# build/cloudbuild.sh +# releasing/cloudbuild.sh # # The script you are reading now does something # analogous via docker tricks. @@ -44,7 +44,7 @@ config=$(mktemp) cat <$config steps: - name: "gcr.io/kubebuilder/goreleaser_with_go_1.12.5:0.0.1" - args: ["bash", "build/cloudbuild.sh", "--snapshot"] + args: ["bash", "releasing/cloudbuild.sh", "--snapshot"] secretEnv: ['GITHUB_TOKEN'] secrets: - kmsKeyName: projects/kustomize-199618/locations/global/keyRings/github-tokens/cryptoKeys/gh-release-token diff --git a/build/vendor_kustomize.diff b/releasing/vendor_kustomize.diff similarity index 100% rename from build/vendor_kustomize.diff rename to releasing/vendor_kustomize.diff diff --git a/build/vendor_kustomize.sh b/releasing/vendor_kustomize.sh similarity index 100% rename from build/vendor_kustomize.sh rename to releasing/vendor_kustomize.sh