Skip to content

Commit

Permalink
Update notes for releasing.
Browse files Browse the repository at this point in the history
  • Loading branch information
monopole committed Jun 26, 2019
1 parent b8b49c3 commit 55585d8
Show file tree
Hide file tree
Showing 12 changed files with 106 additions and 58 deletions.
43 changes: 0 additions & 43 deletions build/README.md

This file was deleted.

16 changes: 10 additions & 6 deletions 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 |\
Expand All @@ -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:

<!-- @installkustomize @test -->
```
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion docs/versioningPolicy.md
Expand Up @@ -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
Expand Down
87 changes: 87 additions & 0 deletions 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.

2 changes: 1 addition & 1 deletion build/cloudbuild.sh → releasing/cloudbuild.sh
Expand Up @@ -54,6 +54,6 @@ done

/goreleaser \
release \
--config=build/goreleaser.yaml \
--config=releasing/goreleaser.yaml \
--rm-dist \
--skip-validate ${SNAPSHOT}
2 changes: 1 addition & 1 deletion build/cloudbuild.yaml → releasing/cloudbuild.yaml
Expand Up @@ -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
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions build/localbuild.sh → releasing/localbuild.sh
Expand Up @@ -2,7 +2,7 @@

# Usage
#
# ./build/localbuild.sh
# ./releasing/localbuild.sh
#
# The script attempts to use cloudbuild configuration
# to create a release "locally".
Expand All @@ -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.
Expand All @@ -44,7 +44,7 @@ config=$(mktemp)
cat <<EOF >$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
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 55585d8

Please sign in to comment.