@@ -54,14 +54,21 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
|
|||||||
generator](https://github.com/kubernetes/release/tree/master/cmd/release-notes)
|
generator](https://github.com/kubernetes/release/tree/master/cmd/release-notes)
|
||||||
1. Generate release notes for the release. Replace arguments with the relevant
|
1. Generate release notes for the release. Replace arguments with the relevant
|
||||||
information.
|
information.
|
||||||
|
* For new minor releases on master:
|
||||||
```
|
```
|
||||||
GITHUB_TOKEN=<token> ./release-notes --start-sha=0ed6978fd199e3ca10326b82b4b8b8e916211c9b --end-sha=3cb3d2f18ed8cb40371c6d8886edcabd1f27e7b9 \
|
GITHUB_TOKEN=<token> release-notes --discover=mergebase-to-latest
|
||||||
--github-org=kubernetes-csi --github-repo=external-attacher -branch=master -output out.md
|
--github-org=kubernetes-csi --github-repo=external-provisioner
|
||||||
|
--required-author="" --output out.md
|
||||||
```
|
```
|
||||||
* `--start-sha` should point to the last release from the same branch. For
|
* For new patch releases on a release branch:
|
||||||
example:
|
```
|
||||||
* `1.X-1.0` tag when releasing `1.X.0`
|
GITHUB_TOKEN=<token> release-notes --branch=release-1.1
|
||||||
* `1.X.Y-1` tag when releasing `1.X.Y`
|
--start-rev=v1.1.1 --end-sha=f0a9219b29cc9053047c39d149ce9b22bc7b918b
|
||||||
|
--github-org=kubernetes-csi --github-repo=external-provisioner
|
||||||
|
--required-author="" --output out.md
|
||||||
|
```
|
||||||
|
* `--start-rev` should point to the last patch release from the release branch.
|
||||||
|
* `--end-sha` should point to the latest commit from the release branch.
|
||||||
1. Compare the generated output to the new commits for the release to check if
|
1. Compare the generated output to the new commits for the release to check if
|
||||||
any notable change missed a release note.
|
any notable change missed a release note.
|
||||||
1. Reword release notes as needed. Make sure to check notes for breaking
|
1. Reword release notes as needed. Make sure to check notes for breaking
|
||||||
|
@@ -60,18 +60,25 @@ else
|
|||||||
TESTARGS =
|
TESTARGS =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
|
|
||||||
|
|
||||||
# Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables
|
# Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables
|
||||||
# to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below.
|
# to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below.
|
||||||
|
|
||||||
|
# BUILD_PLATFORMS contains a set of <os> <arch> <suffix> triplets,
|
||||||
|
# separated by semicolon. An empty variable or empty entry (= just a
|
||||||
|
# semicolon) builds for the default platform of the current Go
|
||||||
|
# toolchain.
|
||||||
|
BUILD_PLATFORMS =
|
||||||
|
|
||||||
|
# This builds each command (= the sub-directories of ./cmd) for the target platform(s)
|
||||||
|
# defined by BUILD_PLATFORMS.
|
||||||
build-%: check-go-version-go
|
build-%: check-go-version-go
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
CGO_ENABLED=0 GOOS=linux go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$*
|
echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch suffix; do \
|
||||||
if [ "$$ARCH" = "amd64" ]; then \
|
if ! (set -x; CGO_ENABLED=0 GOOS="$$os" GOARCH="$$arch" go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o "./bin/$*$$suffix" ./cmd/$*); then \
|
||||||
CGO_ENABLED=0 GOOS=windows go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*.exe ./cmd/$* ; \
|
echo "Building $* for GOOS=$$os GOARCH=$$arch failed, see error(s) above."; \
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*-ppc64le ./cmd/$* ; \
|
exit 1; \
|
||||||
fi
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
container-%: build-%
|
container-%: build-%
|
||||||
docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) .
|
docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) .
|
||||||
|
@@ -85,6 +85,8 @@ get_versioned_variable () {
|
|||||||
echo "$value"
|
echo "$value"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; windows amd64 .exe; linux ppc64le -ppc64le; linux s390x -s390x" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries"
|
||||||
|
|
||||||
# If we have a vendor directory, then use it. We must be careful to only
|
# If we have a vendor directory, then use it. We must be careful to only
|
||||||
# use this for "make" invocations inside the project's repo itself because
|
# use this for "make" invocations inside the project's repo itself because
|
||||||
# setting it globally can break other go usages (like "go get <some command>"
|
# setting it globally can break other go usages (like "go get <some command>"
|
||||||
@@ -340,7 +342,7 @@ configvar CSI_PROW_E2E_ALPHA_GATES_LATEST '' "alpha feature gates for latest Kub
|
|||||||
configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates"
|
configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates"
|
||||||
|
|
||||||
# Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment
|
# Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment
|
||||||
configvar CSI_SNAPSHOTTER_VERSION 'v2.0.0' "external-snapshotter version tag"
|
configvar CSI_SNAPSHOTTER_VERSION 'v2.0.1' "external-snapshotter version tag"
|
||||||
|
|
||||||
# Some tests are known to be unusable in a KinD cluster. For example,
|
# Some tests are known to be unusable in a KinD cluster. For example,
|
||||||
# stopping kubelet with "ssh <node IP> systemctl stop kubelet" simply
|
# stopping kubelet with "ssh <node IP> systemctl stop kubelet" simply
|
||||||
@@ -1026,7 +1028,7 @@ main () {
|
|||||||
images=
|
images=
|
||||||
if ${CSI_PROW_BUILD_JOB}; then
|
if ${CSI_PROW_BUILD_JOB}; then
|
||||||
# A successful build is required for testing.
|
# A successful build is required for testing.
|
||||||
run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" || die "'make all' failed"
|
run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" "BUILD_PLATFORMS=${CSI_PROW_BUILD_PLATFORMS}" || die "'make all' failed"
|
||||||
# We don't want test failures to prevent E2E testing below, because the failure
|
# We don't want test failures to prevent E2E testing below, because the failure
|
||||||
# might have been minor or unavoidable, for example when experimenting with
|
# might have been minor or unavoidable, for example when experimenting with
|
||||||
# changes in "release-tools" in a PR (that fails the "is release-tools unmodified"
|
# changes in "release-tools" in a PR (that fails the "is release-tools unmodified"
|
||||||
@@ -1062,18 +1064,24 @@ main () {
|
|||||||
# always pulling the image
|
# always pulling the image
|
||||||
# (https://github.com/kubernetes-sigs/kind/issues/328).
|
# (https://github.com/kubernetes-sigs/kind/issues/328).
|
||||||
docker tag "$i:latest" "$i:csiprow" || die "tagging the locally built container image for $i failed"
|
docker tag "$i:latest" "$i:csiprow" || die "tagging the locally built container image for $i failed"
|
||||||
done
|
|
||||||
|
|
||||||
if [ -e deploy/kubernetes/rbac.yaml ]; then
|
# For components with multiple cmds, the RBAC file should be in the following format:
|
||||||
|
# rbac-$cmd.yaml
|
||||||
|
# If this file cannot be found, we can default to the standard location:
|
||||||
|
# deploy/kubernetes/rbac.yaml
|
||||||
|
rbac_file_path=$(find . -type f -name "rbac-$i.yaml")
|
||||||
|
if [ "$rbac_file_path" == "" ]; then
|
||||||
|
rbac_file_path="$(pwd)/deploy/kubernetes/rbac.yaml"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e "$rbac_file_path" ]; then
|
||||||
# This is one of those components which has its own RBAC rules (like external-provisioner).
|
# This is one of those components which has its own RBAC rules (like external-provisioner).
|
||||||
# We are testing a locally built image and also want to test with the the current,
|
# We are testing a locally built image and also want to test with the the current,
|
||||||
# potentially modified RBAC rules.
|
# potentially modified RBAC rules.
|
||||||
if [ "$(echo "$cmds" | wc -w)" != 1 ]; then
|
e=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr - _)
|
||||||
die "ambiguous deploy/kubernetes/rbac.yaml: need exactly one command, got: $cmds"
|
images="$images ${e}_RBAC=$rbac_file_path"
|
||||||
fi
|
|
||||||
e=$(echo "$cmds" | tr '[:lower:]' '[:upper:]' | tr - _)
|
|
||||||
images="$images ${e}_RBAC=$(pwd)/deploy/kubernetes/rbac.yaml"
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if tests_need_non_alpha_cluster; then
|
if tests_need_non_alpha_cluster; then
|
||||||
|
Reference in New Issue
Block a user