mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-10 08:20:59 +00:00
Update README.md
This commit is contained in:
committed by
Jeffrey Regan
parent
35dc15b16b
commit
2f2d078669
@@ -7,13 +7,9 @@ set -x
|
||||
module=$1
|
||||
shift
|
||||
|
||||
executable=$module
|
||||
|
||||
cd $module
|
||||
|
||||
configFile=$(mktemp)
|
||||
cat <<EOF >$configFile
|
||||
project_name: $executable
|
||||
project_name: $module
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
- GO111MODULE=on
|
||||
@@ -32,7 +28,7 @@ release:
|
||||
owner: kubernetes-sigs
|
||||
name: kustomize
|
||||
builds:
|
||||
- binary: $executable
|
||||
- binary: $module
|
||||
ldflags: >
|
||||
-s
|
||||
-X sigs.k8s.io/kustomize/api/provenance.version={{.Version}}
|
||||
@@ -50,5 +46,3 @@ EOF
|
||||
cat $configFile
|
||||
|
||||
/bin/goreleaser release --config=$configFile --rm-dist --skip-validate $@
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ steps:
|
||||
args: [fetch, --tags, --depth=100]
|
||||
- name: goreleaser/goreleaser
|
||||
entrypoint: /bin/sh
|
||||
args: ["releasing/cloudbuild.sh", "api"]
|
||||
args: ["cloudbuild.sh", "api"]
|
||||
secretEnv: ['GITHUB_TOKEN']
|
||||
secrets:
|
||||
- kmsKeyName: projects/kustomize-199618/locations/global/keyRings/github-tokens/cryptoKeys/gh-release-token
|
||||
48
kustomize/cloudbuild.sh
Executable file
48
kustomize/cloudbuild.sh
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# Script to run http://goreleaser.com
|
||||
|
||||
module=$1
|
||||
shift
|
||||
|
||||
configFile=$(mktemp)
|
||||
cat <<EOF >$configFile
|
||||
project_name: $module
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
- GO111MODULE=on
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
- Merge pull request
|
||||
- Merge branch
|
||||
release:
|
||||
github:
|
||||
owner: kubernetes-sigs
|
||||
name: kustomize
|
||||
builds:
|
||||
- binary: $module
|
||||
ldflags: >
|
||||
-s
|
||||
-X sigs.k8s.io/kustomize/api/provenance.version={{.Version}}
|
||||
-X sigs.k8s.io/kustomize/api/provenance.gitCommit={{.Commit}}
|
||||
-X sigs.k8s.io/kustomize/api/provenance.buildDate={{.Date}}
|
||||
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
EOF
|
||||
|
||||
cat $configFile
|
||||
|
||||
/bin/goreleaser release --config=$configFile --rm-dist --skip-validate $@
|
||||
@@ -3,7 +3,7 @@ steps:
|
||||
args: [fetch, --tags, --depth=100]
|
||||
- name: goreleaser/goreleaser
|
||||
entrypoint: /bin/sh
|
||||
args: ["releasing/cloudbuild.sh", "kustomize"]
|
||||
args: ["../releasing/cloudbuild.sh", "kustomize"]
|
||||
secretEnv: ['GITHUB_TOKEN']
|
||||
secrets:
|
||||
- kmsKeyName: projects/kustomize-199618/locations/global/keyRings/github-tokens/cryptoKeys/gh-release-token
|
||||
48
pluginator/cloudbuild.sh
Executable file
48
pluginator/cloudbuild.sh
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# Script to run http://goreleaser.com
|
||||
|
||||
module=$1
|
||||
shift
|
||||
|
||||
configFile=$(mktemp)
|
||||
cat <<EOF >$configFile
|
||||
project_name: $module
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
- GO111MODULE=on
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
- Merge pull request
|
||||
- Merge branch
|
||||
release:
|
||||
github:
|
||||
owner: kubernetes-sigs
|
||||
name: kustomize
|
||||
builds:
|
||||
- binary: $module
|
||||
ldflags: >
|
||||
-s
|
||||
-X sigs.k8s.io/kustomize/api/provenance.version={{.Version}}
|
||||
-X sigs.k8s.io/kustomize/api/provenance.gitCommit={{.Commit}}
|
||||
-X sigs.k8s.io/kustomize/api/provenance.buildDate={{.Date}}
|
||||
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
EOF
|
||||
|
||||
cat $configFile
|
||||
|
||||
/bin/goreleaser release --config=$configFile --rm-dist --skip-validate $@
|
||||
@@ -3,7 +3,7 @@ steps:
|
||||
args: [fetch, --tags, --depth=100]
|
||||
- name: goreleaser/goreleaser
|
||||
entrypoint: /bin/sh
|
||||
args: ["releasing/cloudbuild.sh", "pluginator"]
|
||||
args: ["../releasing/cloudbuild.sh", "pluginator"]
|
||||
secretEnv: ['GITHUB_TOKEN']
|
||||
secrets:
|
||||
- kmsKeyName: projects/kustomize-199618/locations/global/keyRings/github-tokens/cryptoKeys/gh-release-token
|
||||
@@ -14,16 +14,16 @@ These modules release independently.
|
||||
## Module summaries
|
||||
|
||||
[`sigs.k8s.io/kustomize/kustomize`]: #sigsk8siokustomizekustomize
|
||||
[`sigs.k8s.io/kustomize`]: #sigsk8siokustomize
|
||||
[`sigs.k8s.io/kustomize/api`]: #sigsk8siokustomizeapi
|
||||
[`sigs.k8s.io/kustomize/pluginator`]: #sigsk8siokustomizepluginator
|
||||
[kustomize/v3.2.1]: https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv3.2.1
|
||||
[pluginator/v1.0.0]: https://github.com/kubernetes-sigs/kustomize/releases/tag/pluginator%2Fv1.0.0
|
||||
|
||||
| Module Description | Module Prefix | Tag | Branch Name |
|
||||
| Module Description | Module Prefix | Ex. Tag | Ex. Branch Name |
|
||||
| --- | ------ | --- | --- |
|
||||
| kustomize executable | [`sigs.k8s.io/kustomize/kustomize`] | _kustomize/v{major}.{minor}.{patch}_ | _release-kustomize-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}_ |
|
||||
| kustomize executable | [`sigs.k8s.io/kustomize/kustomize`] | _kustomize/v3.2.2_ | _release-kustomize-v3.2.2_ |
|
||||
| kustomize Go API | [`sigs.k8s.io/kustomize/api`] | _api/v0.1.0_ | _release-api-v0.1_ |
|
||||
| pluginator executable | [`sigs.k8s.io/kustomize/pluginator`] | _pluginator/v1.0.0_ | _release-pluginator-v1.0_ |
|
||||
|
||||
|
||||
### sigs.k8s.io/kustomize/kustomize
|
||||
@@ -143,9 +143,7 @@ Go's [semver]-compatible version tags take the form `v{major}.{minor}.{patch}`:
|
||||
with respect to CLI arguments and flags), increment `major`.
|
||||
|
||||
```
|
||||
major=1
|
||||
minor=2
|
||||
patch=3
|
||||
major=0; minor=1; patch=0
|
||||
```
|
||||
|
||||
### create the release branch
|
||||
@@ -158,9 +156,15 @@ since the branch accumulates patch releases.
|
||||
> TODO: define procedure for doing a cherrypick (committing a patch) to a
|
||||
> release branch that already exists.
|
||||
|
||||
Name the branch:
|
||||
|
||||
```
|
||||
branch="release-${module}-v${major}.${minor}"
|
||||
echo "branch=$branch"
|
||||
```
|
||||
|
||||
Create it:
|
||||
```
|
||||
git checkout -b $branch
|
||||
```
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Usage - from the repository root, enter
|
||||
# Usage - from the module (kustomize|pluginator|api) of
|
||||
# your choice, enterthe repository root, enter
|
||||
#
|
||||
# ./releasing/localbuild.sh (kustomize|pluginator|api)
|
||||
# cd module
|
||||
# ../releasing/localbuild.sh
|
||||
#
|
||||
# The script attempts to use cloudbuild configuration
|
||||
# to create a release "locally".
|
||||
@@ -17,7 +19,9 @@
|
||||
# applied to the kustomize repo, the cloud builder
|
||||
# reads the repository-relative file
|
||||
#
|
||||
# releasing/cloudbuild_(kustomize|pluginator|api).yaml
|
||||
# ${module}/cloudbuild.yaml
|
||||
#
|
||||
# where module is one of kustomize, pluginator or api.
|
||||
#
|
||||
# Inside this yaml file is a reference to the script
|
||||
#
|
||||
@@ -46,7 +50,7 @@ case "$module" in
|
||||
esac
|
||||
|
||||
config=$(mktemp)
|
||||
cp releasing/cloudbuild_${module}.yaml $config
|
||||
cp cloudbuild.yaml $config
|
||||
|
||||
# Delete the cloud-builders/git step, which isn't needed
|
||||
# for a local run.
|
||||
@@ -72,5 +76,5 @@ cloud-build-local \
|
||||
echo " "
|
||||
echo "Result of local build:"
|
||||
echo "##########################################"
|
||||
tree ./$module/dist
|
||||
tree ./dist
|
||||
echo "##########################################"
|
||||
|
||||
Reference in New Issue
Block a user