Skip to content

Commit c5d46bb

Browse files
committed
Squashed 'release-tools/' changes from 7bc70e5..1748b16
1748b16 Merge pull request kubernetes-csi#136 from pohly/go-1.16 ec844ea remove travis.yml, Go 1.16 df76aba Merge pull request kubernetes-csi#134 from andyzhangx/add-build-arg e314a56 add build-arg ARCH for building multi-arch images, e.g. ARG ARCH FROM k8s.gcr.io/build-image/debian-base-${ARCH}:v2.1.3 git-subtree-dir: release-tools git-subtree-split: 1748b16
1 parent 7fa1349 commit c5d46bb

File tree

6 files changed

+11
-33
lines changed

6 files changed

+11
-33
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ The expected repository layout is:
2121
Dockerfile in the root when only building a single command
2222
- `Makefile` - includes `release-tools/build.make` and sets
2323
configuration variables
24-
- `.travis.yml` - a symlink to `release-tools/.travis.yml`
24+
- `.prow.sh` script which imports `release-tools/prow.sh`
25+
and may contain further customization
26+
- `.cloudbuild.sh` and `cloudbuild.yaml` as symlinks to
27+
the corresponding files in `release-tools` or (if necessary)
28+
as custom files
2529

2630
To create a release, tag a certain revision with a name that
2731
starts with `v`, for example `v1.0.0`, then `make push`

build.make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ $(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-%
149149
--platform=$$os/$$arch \
150150
--file $$(eval echo \$${dockerfile_$$os}) \
151151
--build-arg binary=./bin/$*$$suffix \
152+
--build-arg ARCH=$$arch \
152153
--label revision=$(REV) \
153154
.; \
154155
done; \

cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ options:
2525
substitution_option: ALLOW_LOOSE
2626
steps:
2727
# The image must contain bash and curl. Ideally it should also contain
28-
# the desired version of Go (currently defined in release-tools/travis.yml),
28+
# the desired version of Go (currently defined in release-tools/prow.sh),
2929
# but that just speeds up the build and is not required.
3030
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20200421-a2bf5f8'
3131
entrypoint: ./.cloudbuild.sh

prow.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,7 @@ configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; windows amd64 .exe; linux ppc64
8585
# which is disabled with GOFLAGS=-mod=vendor).
8686
configvar GOFLAGS_VENDOR "$( [ -d vendor ] && echo '-mod=vendor' )" "Go flags for using the vendor directory"
8787

88-
# Go versions can be specified separately for different tasks
89-
# If the pre-installed Go is missing or a different
90-
# version, the required version here will get installed
91-
# from https://golang.org/dl/.
92-
go_from_travis_yml () {
93-
grep "^ *- go:" "${RELEASE_TOOLS_ROOT}/travis.yml" | sed -e 's/.*go: *//'
94-
}
95-
configvar CSI_PROW_GO_VERSION_BUILD "$(go_from_travis_yml)" "Go version for building the component" # depends on component's source code
88+
configvar CSI_PROW_GO_VERSION_BUILD "1.16" "Go version for building the component" # depends on component's source code
9689
configvar CSI_PROW_GO_VERSION_E2E "" "override Go version for building the Kubernetes E2E test suite" # normally doesn't need to be set, see install_e2e
9790
configvar CSI_PROW_GO_VERSION_SANITY "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building the csi-sanity test suite" # depends on CSI_PROW_SANITY settings below
9891
configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below

travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

verify-go-version.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ die () {
2929
version=$("$GO" version) || die "determining version of $GO failed"
3030
# shellcheck disable=SC2001
3131
majorminor=$(echo "$version" | sed -e 's/.*go\([0-9]*\)\.\([0-9]*\).*/\1.\2/')
32-
# shellcheck disable=SC2001
33-
expected=$(grep "^ *- go:" "release-tools/travis.yml" | sed -e 's/.*go: *\([0-9]*\)\.\([0-9]*\).*/\1.\2/')
32+
# SC1091: Not following: release-tools/prow.sh was not specified as input (see shellcheck -x).
33+
# shellcheck disable=SC1091
34+
expected=$(. release-tools/prow.sh && echo "$$CSI_PROW_GO_VERSION_BUILD")
3435

3536
if [ "$majorminor" != "$expected" ]; then
3637
cat >&2 <<EOF

0 commit comments

Comments
 (0)