Define the API release process.

This commit is contained in:
Jeffrey Regan
2019-10-21 15:50:51 -07:00
parent 98cd31b820
commit 83f70877c8
5 changed files with 15 additions and 27 deletions

View File

@@ -1,7 +1,11 @@
os: os:
- linux - linux
- osx # TODO: Uncomment this when someone figures out how
# TODO: Uncomment when tests running on Windows. # to speed up the slowness of homebrew installation on
# oxs; presumably cache images?
# - osx
#
# TODO: Uncomment when some gets the tests running on Windows.
# - windows # - windows
addons: addons:

View File

@@ -22,7 +22,7 @@ These modules release independently.
| Module Description | Module Prefix | Tag | Branch Name | | Module Description | Module Prefix | Tag | Branch Name |
| --- | ------ | --- | --- | | --- | ------ | --- | --- |
| kustomize executable | [`sigs.k8s.io/kustomize/kustomize`] | _kustomize/v{major}.{minor}.{patch}_ | _release-kustomize-v{major}.{minor}_ | | kustomize executable | [`sigs.k8s.io/kustomize/kustomize`] | _kustomize/v{major}.{minor}.{patch}_ | _release-kustomize-v{major}.{minor}_ |
| kustomize Go API | [`sigs.k8s.io/kustomize`] | _v{major}.{minor}.{patch}_ | _release-api-v{major}.{minor}_ | | kustomize Go API | [`sigs.k8s.io/kustomize/api`] | _api/v{major}.{minor}.{patch}_ | _release-api-v{major}.{minor}_ |
| pluginator executable | [`sigs.k8s.io/kustomize/pluginator`] | _pluginator/v{major}.{minor}.{patch}_ | _release-pluginator-v{major}.{minor}_ | | pluginator executable | [`sigs.k8s.io/kustomize/pluginator`] | _pluginator/v{major}.{minor}.{patch}_ | _release-pluginator-v{major}.{minor}_ |
@@ -48,7 +48,7 @@ See the [installation instructions](../docs/INSTALL.md)
to perform an install. to perform an install.
### sigs.k8s.io/kustomize ### sigs.k8s.io/kustomize/api
This is the kustomize Go API. This is the kustomize Go API.
@@ -62,10 +62,10 @@ They include methods to read, edit and emit
modified YAML. modified YAML.
Go consumers of this API will have a `go.mod` file Go consumers of this API will have a `go.mod` file
_requiring_ this module at a particular tag, e.g. requiring this module at a particular tag, e.g.
``` ```
require sigs.k8s.io/kustomize/v4 v4.0.1 require sigs.k8s.io/kustomize/api v0.0.1
``` ```
#### Release artifacts #### Release artifacts
@@ -76,7 +76,7 @@ that API clients can `require` from their `go.mod` file.
Release notes should appear on the [release page]. Release notes should appear on the [release page].
There's an executable called `kustapiversion`, which, if There's an executable called `api`, which, if
run, prints the API release provenance data, but it's of run, prints the API release provenance data, but it's of
no practical use to an API client. no practical use to an API client.
@@ -218,11 +218,7 @@ git ls-remote --tags upstream
### define the release tag ### define the release tag
``` ```
tag="v${major}.${minor}.${patch}" tag="${module}/v${major}.${minor}.${patch}"
if [ "$module" != "api" ]; then
# must prefix the tag with submodule name
tag="${module}/${tag}"
fi
echo "tag=$tag" echo "tag=$tag"
``` ```

View File

@@ -8,16 +8,8 @@ module=$1
shift shift
executable=$module executable=$module
if [ "$module" == "api" ]; then
# For this module, there's no correspondingly named
# sub-directory, since the module is at the repo root.
# There is, however, a dummy executable in a sub-directory.
# Build that executable, primarily to give goreleaser
# something to coordinate it release process around.
executable=kustapiversion
fi
cd $executable cd $module
configFile=$(mktemp) configFile=$(mktemp)
cat <<EOF >$configFile cat <<EOF >$configFile

View File

@@ -2,7 +2,7 @@
# Usage - from the repository root, enter # Usage - from the repository root, enter
# #
# ./releasing/localbuild.sh (kustomize|pluginator) # ./releasing/localbuild.sh (kustomize|pluginator|api)
# #
# The script attempts to use cloudbuild configuration # The script attempts to use cloudbuild configuration
# to create a release "locally". # to create a release "locally".
@@ -72,9 +72,5 @@ cloud-build-local \
echo " " echo " "
echo "Result of local build:" echo "Result of local build:"
echo "##########################################" echo "##########################################"
if [ "$module" == "api" ]; then tree ./$module/dist
tree ./kustapiversion/dist
else
tree ./$module/dist
fi
echo "##########################################" echo "##########################################"