Commit Graph

37 Commits

Author SHA1 Message Date
Patrick Ohly faa1cede8d Squashed 'release-tools/' changes from a6a1a79..335339f
https://github.com/kubernetes-csi/csi-release-tools/commit/335339f Merge https://github.com/kubernetes-csi/csi-release-tools/pull/187 from mauriciopoppe/remove-eol-windows-versions
https://github.com/kubernetes-csi/csi-release-tools/commit/890b87a Merge https://github.com/kubernetes-csi/csi-release-tools/pull/188 from pwschuurman/update-release-notes-docs
https://github.com/kubernetes-csi/csi-release-tools/commit/274bc9b Update Sidecar Release Process documentation to reference latest syntax for release-notes tool
https://github.com/kubernetes-csi/csi-release-tools/commit/87b6c37 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/185 from Garima-Negi/fix-OWNERS-files
https://github.com/kubernetes-csi/csi-release-tools/commit/f1de2c6 Fix OWNERS file - squashed commits
https://github.com/kubernetes-csi/csi-release-tools/commit/59ae38b Remove EOL windows versions from BUILD_PLATFORMS
https://github.com/kubernetes-csi/csi-release-tools/commit/5d66471 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/186 from humblec/sp
https://github.com/kubernetes-csi/csi-release-tools/commit/d066f1b Correct prow.sh typo and make codespell linter pass
https://github.com/kubernetes-csi/csi-release-tools/commit/762e22d Merge https://github.com/kubernetes-csi/csi-release-tools/pull/184 from pohly/image-publishing-troubleshooting
https://github.com/kubernetes-csi/csi-release-tools/commit/81e26c3 SIDECAR_RELEASE_PROCESS.md: add troubleshooting for image publishing
https://github.com/kubernetes-csi/csi-release-tools/commit/31aa44d Merge https://github.com/kubernetes-csi/csi-release-tools/pull/182 from chrishenzie/csi-sanity-version
https://github.com/kubernetes-csi/csi-release-tools/commit/f49e141 Update csi-sanity test suite to v4.3.0
https://github.com/kubernetes-csi/csi-release-tools/commit/d9815c2 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/181 from mauriciopoppe/armv7-support
https://github.com/kubernetes-csi/csi-release-tools/commit/05c1801 Add support to build arm/v7 images
https://github.com/kubernetes-csi/csi-release-tools/commit/4aedf35 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/178 from xing-yang/timeout
https://github.com/kubernetes-csi/csi-release-tools/commit/2b9897e Increase build timeout
https://github.com/kubernetes-csi/csi-release-tools/commit/51d3702 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/177 from mauriciopoppe/kind-image-1.23
https://github.com/kubernetes-csi/csi-release-tools/commit/a30efea Add kind image for 1.23

git-subtree-dir: release-tools
git-subtree-split: 335339f059da0b8b1947794a8c75d9e5b973cb79
2022-02-16 17:32:40 +01:00
Aaron Crickenberger a17045a909 Squashed 'release-tools/' changes from 3b6d17b..5489de6
5489de6 Merge pull request #174 from mauriciopoppe/bump-kind-version
0c675d4 Bump kind version to v0.11.1
ef69a88 Merge pull request #173 from nick5616/add-ws2022
44c710c added WS2022 to build platforms
0883be4 Merge pull request #171 from pohly/example-commands
02cda51 build.make: support binaries outside of cmd, with optional go.mod
65922ea Merge pull request #170 from pohly/canary-snapshot-controller
c0bdfb3 prow.sh: deploy canary snapshot-controller in canary jobs
0438f15 Merge pull request #167 from c0va23/feature/release-armv7-image
4786f4d Merge pull request #168 from msau42/update-release-prereq
6a2dc64 Remove requirement to be top-level approver. Only maintainers membership is required to do a release
30a4f7b Release armv7 image
ac8108f Merge pull request #165 from consideRatio/pr/update-github-links-ref-to-master-to-HEAD
999b483 docs: make github links reference HEAD instead of main
fd67069 docs: make github links reference HEAD instead of master
c0a4fb1 Merge pull request #164 from anubha-v-ardhan/patch-1
9c6a6c0 Master to main cleanup
682c686 Merge pull request #162 from pohly/pod-name-via-shell-command
36a29f5 Merge pull request #163 from pohly/remove-bazel
68e43ca prow.sh: remove Bazel build support
c5f59c5 prow.sh: allow shell commands in CSI_PROW_SANITY_POD
71c810a Merge pull request #161 from pohly/mock-test-fixes
9e438f8 prow.sh: fix mock testing
d7146c7 Merge pull request #160 from pohly/kind-update
4b6aa60 prow.sh: update to KinD v0.11.0
7cdc76f Merge pull request #159 from pohly/fix-deployment-selection
ef8bd33 prow.sh: more flexible CSI_PROW_DEPLOYMENT, part II
204bc89 Merge pull request #158 from pohly/fix-deployment-selection
61538bb prow.sh: more flexible CSI_PROW_DEPLOYMENT
2b0e6db Merge pull request #157 from humblec/csi-release
a2fcd6d Adding myself to csi reviewers group
f325590 Merge pull request #149 from pohly/cluster-logs
4b03b30 Merge pull request #155 from pohly/owners
a6453c8 owners: introduce aliases
ad83def Merge pull request #153 from pohly/fix-image-builds
5561780 build.make: fix image publishng
29bd39b Merge pull request #152 from pohly/bump-csi-test
bc42793 prow.sh: use csi-test v4.2.0
b546baa Merge pull request #150 from mauriciopoppe/windows-multiarch-args
bfbb6f3 add parameter base_image and addon_image to BUILD_PARAMETERS
2d61d3b Merge pull request #151 from humblec/cm
48e71f0 Replace `which` command ( non standard)  with `command -v` builtin
feb20e2 prow.sh: collect cluster logs
7b96bea Merge pull request #148 from dobsonj/add-checkpathcmd-to-prow
2d2e03b prow.sh: enable -csi.checkpathcmd option in csi-sanity
09d4151 Merge pull request #147 from pohly/mock-testing
74cfbc9 prow.sh: support mock tests
4a3f110 prow.sh: remove obsolete test suppression
6616a6b Merge pull request #146 from pohly/kubernetes-1.21
510fb0f prow.sh: support Kubernetes 1.21
c63c61b prow.sh: add CSI_PROW_DEPLOYMENT_SUFFIX
51ac11c Merge pull request #144 from pohly/pull-jobs
dd54c92 pull-test.sh: test importing csi-release-tools into other repo
7d2643a Merge pull request #143 from pohly/path-setup
6880b0c prow.sh: avoid creating paths unless really running tests
bc0504a Merge pull request #140 from jsafrane/remove-unused-k8s-libs
5b1de1a go-get-kubernetes.sh: remove unused k8s libs
49b4269 Merge pull request #120 from pohly/add-kubernetes-release
a1e1127 Merge pull request #139 from pohly/kind-for-kubernetes-latest
1c0fb09 prow.sh: use KinD main for latest Kubernetes
1d77cfc Merge pull request #138 from pohly/kind-update-0.10
bff2fb7 prow.sh: KinD 0.10.0
95eac33 Merge pull request #137 from pohly/fix-go-version-check
437e431 verify-go-version.sh: fix check after removal of travis.yml
1748b16 Merge pull request #136 from pohly/go-1.16
ec844ea remove travis.yml, Go 1.16
df76aba Merge pull request #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
7bc70e5 Merge pull request #129 from pohly/squash-documentation
e0b02e7 README.md: document usage of --squash
316cb95 Merge pull request #132 from yiyang5055/bugfix/boilerplate
26e2ab1 fix: default boilerplate path
1add8c1 Merge pull request #133 from pohly/kubernetes-1.20-tag
3e811d6 prow.sh: fix "on-master" prow jobs
1d60e77 Merge pull request #131 from pohly/kubernetes-1.20-tag
9f10459 prow.sh: support building Kubernetes for a specific version
f7e7ee4 docs: steps for adding testing against new Kubernetes release
fe1f284 Merge pull request #121 from kvaps/namespace-check
8fdf0f7 Merge pull request #128 from fengzixu/master
1c94220 fix: fix a bug of csi-sanity
a4c41e6 Merge pull request #127 from pohly/fix-boilerplate
ece0f50 check namespace for snapshot-controller
dbd8967 verify-boilerplate.sh: fix path to script
9289fd1 Merge pull request #125 from sachinkumarsingh092/optional-spelling-boilerplate-checks
ad29307 Make the spelling and boilerplate checks optional
5f06d02 Merge pull request #124 from sachinkumarsingh092/fix-spellcheck-boilerplate-tests
48186eb Fix spelling and boilerplate errors
71690af Merge pull request #122 from sachinkumarsingh092/include-spellcheck-boilerplate-tests
981be3f Adding spelling and boilerplate checks.
2bb7525 Merge pull request #117 from fengzixu/master
4ab8b15 use the tag to replace commit of csi-test
5d74e45 change the csi-test import path to v4
7dcd0a9 upgrade csi-test to v4.0.2

git-subtree-dir: release-tools
git-subtree-split: 5489de6e743cf8362e5ab8275988cc748d0758b0
2021-09-20 14:59:10 -07:00
andyzhangx c3a9662513 allow export image name and registry name
revert part of change
2020-11-26 08:00:45 +00:00
Abhisek Banerjee b5b447b50b Add go ldflags using LDFLAGS at the time of compilation 2020-10-23 19:03:06 +00:00
Patrick Ohly 340e082f04 build.make: optional inclusion of Windows in multiarch images
Most repos inherit the default BUILD_PLATFORMS, which includes
Windows, but don't have the necessary Dockerfile.Windows yet. To
simplify the rollout of multiarch image builds, Windows binary
building continues to be tested (i.e. BUILD_PLATFORMS remains
unchanged), but push-multiarch skips Windows if the Dockerfile.Windows
is missing.
2020-06-03 11:05:05 +02:00
Patrick Ohly 5231f05d8b build.make: properly declare push-multiarch
It's not a real file and thus should better be marked as phony.
2020-06-03 11:04:29 +02:00
Patrick Ohly 4569f27a8c build.make: fix push-multiarch ambiguity
"make push-multiarch" matched both push-multiarch and push-%.  This
seems to be none-deterministic and in at least one
repo (external-provisioner), make picked the wildcard rule which then
failed because there is no "multiarch" command.

This ambiguity gets resolved by instantiating the wildcard rules only
for existing commands. The advantage also is that "make
push-no-such-command" will fail with an obvious "No rule to make
target 'push-no-such-command'" instead of attempting to build the
command.
2020-06-03 11:03:54 +02:00
Patrick Ohly bd416901d4 cloud build: initial set of shared files
The approach taken here extends the existing support for
cross-compiling binaries on the build host and specifying the Go
compiler: Go is installed if needed (as in Prow testing), binaries are
build on the host, then one image is created for each platform, and
finally those are combined into a single multi-architecture image.
2020-05-28 10:31:35 +02:00
Patrick Ohly 3863a0f674 build for multiple platforms only in CI, add s390x
Developers should not be forced to build for all platforms by
default. We also don't want to copy-and-paste the go invocation for
each new platform.

To address both, the target platform(s) are now configurable via
BUILD_PLATFORMS and additional platforms are only enabled in the Prow
CI.

For now this serves as a test that the source actually compiles for
multiple platforms. Building images for different target platforms is a
different problem.
2020-03-04 11:39:24 +01:00
Jan Wozniak fdb32183fe Change 'make test-vet' to call 'go vet' 2020-02-13 11:21:45 +01:00
Michelle Au a4e6299668 fix syntax for ppc64le build 2019-12-04 14:12:50 -08:00
Peeyush Gupta 83a4ef15df Adding build for ppc64le 2019-11-19 08:58:58 -05:00
Patrick Ohly 23df4aef51 prow.sh: use vendor directory if available
This avoids dependencies on the Go module cache or the upstream code
hosting.
2019-11-04 15:21:49 +01:00
Patrick Ohly c8a1c4af93 better handling of Go version
Some operations are sensitive to the version of Go that is used. In
the past, formatting of source differed depending on the
version. Right now it is the content of the vendor directory which
changes when switch back and forth between 1.12 and 1.13.

We don't want to impose a certain workflow on developers, like forcing
all invocations of Go to run inside a container. If developers want
that, they can set up their development environment accordingly.

But we should warn about this aspect to raise awareness. "make"
invocations which involve Go now compare against the projects Go
version (specified in travis.yml) once at the beginning. This is only
a warning because we don't know which future version will be
compatible with the project.

Vendor directory handling gets updated, too: verification is now a
separate script (became too complex for make) and there is a
corresponding "update-vendor.sh". In contrast to verification,
updating vendor is not integrated into make and thus itself invokes
the go version check.
2019-10-31 11:59:34 +01:00
Kubernetes Prow Robot 2c81919807
Merge pull request #34 from pohly/go-mod-tidy
update Go mod support
2019-10-08 08:11:15 -07:00
Deep Debroy 2d6b3ce85f Build Windows only for amd64
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-10-07 16:38:04 -07:00
Patrick Ohly 194289aa8e update Go mod support
It turned out that changes like
https://github.com/kubernetes-csi/csi-lib-utils/pull/33 should better
have been committed after `go mod tidy` because that adds some
indirect dependencies in that example.

The revised `test-vendor` checks for that and (just in case that this
ever becomes desired) allows projects to not have a vendor directory
when using `go mod`.

How to use `go mod` properly gets documented in the README.md, because
there are such pitfalls.
2019-10-04 14:27:41 +02:00
Michelle Au ea2f1b5277 build windows binaries with .exe suffix 2019-09-06 19:15:35 -07:00
Deep Debroy 9fba09b414 Add rule for building Windows binaries
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-08-28 06:24:26 -07:00
Patrick Ohly 066143d146 build.make: allow repos to use 'go mod' for vendoring
How a repo does vendoring is detected based on the presence of
Gopkg.toml.

The vendor check with `dep` was all done locally, but the
corresponding check for `go mod` requires network access. The check
therefore gets skipped when running in the Prow CI in situations where
we are sure that it isn't needed (for example, in a periodic job).
2019-05-11 17:07:14 +02:00
Pengzhi Sun ff9bce4a71 Replace 'return' to 'exit' to fix shellcheck error 2019-04-11 17:42:44 +08:00
Patrick Ohly 9b0d9cd743 build.make: skip shellcheck if Docker is not available
Not all environments have Docker. The simplifying assumption here is
that if the Docker command is available, it's also usable.
2019-04-09 10:48:37 +02:00
Kubernetes Prow Robot 2069a0af3b
Merge pull request #11 from pohly/verify-shellcheck
verify shellcheck
2019-04-02 08:59:18 -07:00
Patrick Ohly 6c7ba1be0f build.make: integrate shellcheck into "make test"
By default this only tests the scripts inside the "release-tools"
directory, which is useful when making experimental changes to them in
a component that uses csi-release-tools. But a component can also
enable checking for other directories.
2019-04-02 09:01:09 +02:00
Kubernetes Prow Robot 3b6af7b1cc
Merge pull request #12 from pohly/local-e2e-suite
build.make: avoid unit-testing E2E test suite
2019-03-29 11:46:11 -07:00
Patrick Ohly 104a1ac969 build.make: avoid unit-testing E2E test suite
In repos that have a test/e2e, that test suite should be run
separately because it depends on a running cluster.
2019-03-28 08:40:10 +01:00
Patrick Ohly e6db50df7e check vendor directory
This runs "dep check" to verify that the vendor directory is
up-to-date and meets expectations (= done with dep >= 0.5.0).
2019-03-27 17:47:51 +01:00
Patrick Ohly 94fc1e31d8 build.make: avoid unit-testing E2E test suite
In repos that have a test/e2e, that test suite should be run
separately because it depends on a running cluster.
2019-03-15 11:08:53 +01:00
Kubernetes Prow Robot 33d58fdc29
Merge pull request #5 from pohly/test-enhancements
test enhancements
2019-01-25 09:40:59 -08:00
Patrick Ohly b0336b553c build.make: more readable "make test" output
The introduction for each individual test looked like an actual
command:

  test-subtree
  ./release-tools/verify-subtree.sh release-tools
  Directory 'release-tools' contains non-upstream changes:
  ...

It's better to make it look like a shell comment and increase its
visibility with a longer prefix:

  ### test-subtree:
  ./release-tools/verify-subtree.sh release-tools
  ...
2019-01-25 11:53:36 +01:00
Patrick Ohly 09436b9f90 build.make: fix pushing of "canary" image from master branch
After merging into external-attacher, the next Travis CI run did not
push the "canary" image because the check for "canary" only covered
the case where "-canary" is used as
suffix (https://travis-ci.org/kubernetes-csi/external-attacher/builds/484095261).
2019-01-25 11:48:59 +01:00
Patrick Ohly 147892c954 build.make: support suppressing checks
Individual repos may have to filter out certain packages from
testing. For example, in csi-test the cmd/csi-sanity directory
contains a special test that depends on additional parameters that set
the CSI driver to test against.
2019-01-24 16:43:24 +01:00
Patrick Ohly 154e33d434 build.make: clarify usage of "make V=1"
This may or may not work, depending on which packages have tests and
whether they contain glog.
2019-01-24 16:42:23 +01:00
Patrick Ohly f28c6b60aa test: verify that 'release-tools' subtree is clean
We don't want to allow local modifications in the subtree. Everything
should go to the csi-release-tools repo first.
2019-01-23 14:52:09 +01:00
Patrick Ohly 9132a016e9 test: split up into individual targets, run all
"make test" used to abort after the first test failure. That was
partly intentional: if the simple tests already fail (for example,
because of a syntax error), then there is no point in continuing to
test.

However, it also makes it harder to find all errors in a CI system
when the errors are unrelated (first error shows up, gets fixed, next
error shows up, etc.).

Now "make test" still aborts early, but "make -k test" is used in the
CI and will run all individual tests because they are split up into
different targets.
2019-01-23 14:49:07 +01:00
Patrick Ohly a1136470c2 build.make: initial content
The repo was created with an HTML version of the build.make file from
https://github.com/pohly/csi-build-rules/. Here's the raw file.
2019-01-21 10:11:51 +01:00
Aaron Crickenberger b41cac350d Add files from github.com/pohly/csi-build-rules 2019-01-16 10:51:52 -08:00