Merge pull request #301 from msau42/update-prow

Update prow
This commit is contained in:
Kubernetes Prow Robot
2020-04-22 16:49:44 -07:00
committed by GitHub
3 changed files with 49 additions and 27 deletions

View File

@@ -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-org=kubernetes-csi --github-repo=external-attacher -branch=master -output out.md GITHUB_TOKEN=<token> release-notes --discover=mergebase-to-latest
``` --github-org=kubernetes-csi --github-repo=external-provisioner
* `--start-sha` should point to the last release from the same branch. For --required-author="" --output out.md
example: ```
* `1.X-1.0` tag when releasing `1.X.0` * For new patch releases on a release branch:
* `1.X.Y-1` tag when releasing `1.X.Y` ```
GITHUB_TOKEN=<token> release-notes --branch=release-1.1
--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

View File

@@ -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) .

View File

@@ -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:
# This is one of those components which has its own RBAC rules (like external-provisioner). # rbac-$cmd.yaml
# We are testing a locally built image and also want to test with the the current, # If this file cannot be found, we can default to the standard location:
# potentially modified RBAC rules. # deploy/kubernetes/rbac.yaml
if [ "$(echo "$cmds" | wc -w)" != 1 ]; then rbac_file_path=$(find . -type f -name "rbac-$i.yaml")
die "ambiguous deploy/kubernetes/rbac.yaml: need exactly one command, got: $cmds" if [ "$rbac_file_path" == "" ]; then
rbac_file_path="$(pwd)/deploy/kubernetes/rbac.yaml"
fi fi
e=$(echo "$cmds" | tr '[:lower:]' '[:upper:]' | tr - _)
images="$images ${e}_RBAC=$(pwd)/deploy/kubernetes/rbac.yaml" if [ -e "$rbac_file_path" ]; then
fi # 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,
# potentially modified RBAC rules.
e=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr - _)
images="$images ${e}_RBAC=$rbac_file_path"
fi
done
fi fi
if tests_need_non_alpha_cluster; then if tests_need_non_alpha_cluster; then