Commit Graph

405 Commits

Author SHA1 Message Date
TommyStarK
f38ccc1d40 Makefile: Add example of how to run integration tests and get code coverage report.
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2022-12-16 18:00:44 +01:00
Kubernetes Prow Robot
9313a1f2a6
Merge pull request #113452 from brianpursley/DBG2
Allow DBG=1 to be used with make release-images and make quick-release-images
2022-11-01 19:59:30 -07:00
Brian Pursley
8a1b48046d Allow DBG=1 to be used with make release-images and make quick-release-images 2022-11-01 13:23:16 -04:00
Oscar Utbult
0564fcce0f Add Makefile target lint 2022-10-31 23:57:01 +01:00
Oscar Utbult
de53dcc438 Fix Makefile help target 2022-10-23 14:59:25 +02:00
RuquanZhao
a2a2d5c13b fix typo in Makefile
Signed-off-by: Ruquan Zhao <ruquan.zhao@arm.com>
2022-10-18 16:33:35 +08:00
Tim Hockin
5da7ca9b0f
Clean up detritus from generaed_files
Now that tests are fixed, it should be OK to remove these.
2022-10-04 17:04:49 -07:00
Tim Hockin
1c65dc535f
Remove refs to .make 2022-10-04 08:58:52 -07:00
Tim Hockin
70c1c795e8
Remove generated file rules in make
This is all covered by update-codegen.sh now.

The old `make generated_files` rule still exists, but just prints a
warning.
2022-10-04 08:50:30 -07:00
Tim Hockin
436bebf47d Codegens: Do not auto-set boilerplate path
Make each invocation pass it explicitly.  This will make later commits
cleaner.
2022-10-04 08:45:57 -07:00
Tim Hockin
f87542ac19 Makefile: sort debug output by time 2022-07-13 20:32:55 -07:00
Patrick Ohly
f7427d07e0 build: add ginkgo aliases for WHAT
The alias for vendor/github.com/onsi/ginkgo/ginkgo ensures that code like
30e99cb2a9/experiment/kind-conformance-image-e2e.sh (L110)
continues to work. The one without "vendor/" is there just in case that it
was used because it also worked.

Long term, "ginkgo" is a nicer, version independent alias. It gets used
internally to avoid future churn and gets documented also publicly in the
Makefile help.

The caveat is that there's no guarantee that a future v3 CLI will be compatible
with current invocations. But the most common usage is through
hack/ginkgo-e2e.sh, which can deal with such differences.
2022-07-08 10:46:11 +08:00
Dave Chen
375b2a5fb2 Build Ginkgo binary
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-08 10:46:11 +08:00
Jiabao Qu
b6a976058d remove bazel BUILD in EXCLUDE_TARGET in makefile 2022-06-08 14:24:28 +08:00
Davanum Srinivas
50bea1dad8
Move from k8s.gcr.io to registry.k8s.io
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-05-31 10:16:53 -04:00
Jordan Liggitt
7227c442c0 drop vendor from makefile 2022-05-05 08:47:33 -04:00
Danielle Lancashire
f1f45df2c1 hack: make test-e2e-node: remove old project refs
This commit cleans up references to the old kubernetes-node-e2e-images
project. In the process it removes the `LIST_IMAGES` mode as listing
large numbers of public cloud projects is not particularly useful, and
has been somewhat broken for a long period of time - as we defaulted
launching a VM to a different project than listing.
2022-04-22 00:59:25 +02:00
Kubernetes Prow Robot
45f2c63d6a
Merge pull request #108661 from thockin/makefile-pass-SHELL
Makefile: Pass SHELL to sub-make
2022-03-11 20:30:34 -08:00
Kubernetes Prow Robot
72e67a6b15
Merge pull request #108659 from thockin/makefile-whitespace
Makefile whitespace cleanup
2022-03-11 20:30:22 -08:00
Tim Hockin
ebbc4716a7 Makefile: Pass SHELL to sub-make
It turns out that:

a) SHELL does not automatically get passed down
b) we were resetiing SHELL in the sub-make anyway
2022-03-11 14:51:38 -08:00
Tim Hockin
04a1d20deb Makefile: use $$ in define blocks
Make's "define" feature (macros) is subtle and it took me a long time to
convince myself this all works. In particular, we (prior to this commit)
are terribly inconsistent about the use of `$` vs `$$`.  We mostly get
away with it because the "variables" are more like "constants", but the
inconsistency trips up some things.  For example, using `$(shell)`
inside a macro will run at macro expansion time rather than when the
resulting make code is executed.

For a contrived, but concrete example, derived from our Makefile:

```
define MACRO
ifeq ($(DBG),1)
  $(warning dbg is $(DBG))
endif
endef # macro

TGTS=a b c
$(foreach pfx, $(TGTS), $(eval $(MACRO)))

default:
	@echo $@
```

yields:

```
$ make
Makefile:8: dbg is
Makefile:8: dbg is
Makefile:8: dbg is
default

$ make DBG=1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
default
```

This is because `$(warning)` is evaluated as the macro is expanded.
Replace that with `$(shell)` and you can see how you might end up
running a bunch of things you didn't need to run.  The fix is:

```
define MACRO
ifeq ($(DBG),1)
  $$(warning dbg is $$(DBG))
endif
endef # macro

TGTS=a b c
$(foreach pfx, $(TGTS), $(eval $(MACRO)))

default:
        @echo $@
```

which yields:

```
$ make
default

$ make DBG=1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
default
```

We COULD have only changed `$(warning)` to `$$(warning)` and left
`$(DBG)` alone, because that's a cheap expansion.  I chose NOT to do
that here because it requires brainpower to think about this all, and it
seems easier to set a simple rule: inside a `define`/`endef` block, you
always use `$$` unless you KNOW that you NEED expansion-time evaluation
(as in the `$(prefix)` in this commit, which is effectively an argument
to the macros).
2022-03-11 14:49:47 -08:00
Tim Hockin
be7651f642 Makefile whitespace cleanup 2022-03-11 13:38:25 -08:00
Dave Chen
ace64c0138 Switch to use the DBG flag to build debug binaries
With the merging of #108371, the old way to build the debug binaries
won't work anymore.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-03-09 14:57:59 +08:00
Kubernetes Prow Robot
4968923164
Merge pull request #108379 from thockin/makefile-go2make-empty
Make builds fail if go2make misbehaves
2022-03-03 12:47:40 -08:00
Tim Hockin
ed5e549cde Makefile: Add a DBG flag to build debug binaries
Now `make DBG=1` will produce binaries with no optimizaions and no
inlining, but with symbols and DWARF information.
2022-03-01 08:47:34 -08:00
Tim Hockin
56ad63913a Make builds fail if go2make misbehaves
Rather than an obscure error.
2022-03-01 08:37:40 -08:00
Kubernetes Prow Robot
5b1e538759
Merge pull request #108378 from thockin/makefile-use-loglib
Makefile: emit codegen info via kube::log::status
2022-02-27 14:27:18 -08:00
Kubernetes Prow Robot
6d7c252906
Merge pull request #108377 from thockin/makefile-check-restarts
Makefile: avoid redundant work upon make restart
2022-02-27 13:25:17 -08:00
Tim Hockin
457e8778f7 Makefile: emit codegen info via kube::log::status 2022-02-27 11:33:52 -08:00
Tim Hockin
88fef96e75 Makefile: avoid redundant work upon make restart
Only build and run go2make on the first pass.  If that generates a new
GO_PKGDEPS_FILE, make will restart the whole process and set MAKE_RESTARTS to
a numeric value.

We can use this to avoid re-running go2make, which saves a few seconds
each build.
2022-02-27 10:50:19 -08:00
Tim Hockin
30b20f184e Use build.sh to build go2make
This allows common flags to be passed in (upcoming commits).
2022-02-27 10:28:44 -08:00
Kubernetes Prow Robot
e9760925f9
Merge pull request #108369 from thockin/makefile-errexit
Makefile: use errexit, pipefail, and nounset
2022-02-26 17:45:16 -08:00
Tim Hockin
9ad4a659ae Makefile: use errexit, pipefail, and nounset 2022-02-26 12:32:48 -08:00
Tim Hockin
7a3dded74d Makefile: remove superfluous @ 2022-02-26 12:17:45 -08:00
Danielle Lancashire
9e5fac5bb2 make: test-e2e-node: default to containerd
Since removing dockershim, `make test-e2e-node` will fail by default as
there is no provided container runtime endpoint.

This commit defaults us to using containerd's default socket path as the
local test target, rather than failing hard.
2022-02-01 16:36:06 +01:00
Jonathan Lebon
3ebd93cd02 test-e2e-node: support pure SSH mode
Right now, `run_remote.go` only supports GCE instances. But actually
running the tests is completely independent of GCE and could work just
as well on any SSH-accessible machine.

This patch adds a new `--mode` switch, which defaults to `gce` for
backwards compatibility, but can be set to `ssh`. In that mode, the GCE
API is not used at all, and we simply connect to the hosts given via
`--hosts`.

This is still better than `run_local.go` because the latter mixes build
environment with test environment, which doesn't fit well with
container-optimized operating systems.

This is part of an effort to setup the e2e node tests on Fedora CoreOS
(see https://github.com/coreos/fedora-coreos-tracker/issues/990).

Patch best viewed with whitespace ignored.
2021-11-22 10:13:15 -05:00
Jonathan Lebon
e0723c1e64 test-e2e-node: add SSH_OPTIONS
This allows overriding the default options.
2021-11-22 10:13:13 -05:00
Namanl2001
d9bd480edd
adding comment in makefile
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-11-16 01:24:39 +05:30
Benjamin Elder
71071d13ab remove make rule for test-e2e-kubeadm
this target depended on a broken binary and is clearly unused

kubeadm e2e development should be done with: https://github.com/kubernetes/kubeadm/tree/main/kinder
2021-11-02 12:04:14 -07:00
Namanl2001
952e2732d5
adding make comment
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-30 01:12:32 +05:30
Namanl2001
1b69338460
amending desc in makefile
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-19 21:57:42 +05:30
Namanl2001
ebb2f426c3
adding SSH_KEY desc to makefile
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-19 00:21:37 +05:30
Nabarun Pal
0ab03d3d5b
dependencies: remove go-bindata
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2021-06-29 19:16:51 +05:30
sure freeing go
fa774535eb
Simplify the repeat lines in build/root/Makefile 2021-04-14 17:33:51 +08:00
Kubernetes Prow Robot
e49ba9dff6
Merge pull request #99740 from aramprice/make-kube-cross-image-registry-name-configurable
Add docs for KUBE_BASE_IMAGE_REGISTRY, update code comment
2021-04-08 15:59:26 -07:00
Adolfo García Veytia (Puerco)
999a1f5c76 Add KUBE_BUILD_CONFORMANCE on package-tarballs target
Signed-off-by: Adolfo García Veytia (Puerco) <adolfo.garcia@uservers.net>
2021-03-25 18:20:36 -06:00
Sascha Grunert
273fdd7686
Build conformance issue when building via cross or cross-in-a-container
This enables building the conformance image when running `make
cross-in-a-container`, which is being used by the release engineering
tooling.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-03-15 15:29:04 +01:00
aram price
c4bae5658f Update build/README.md and build/root/Makefile
* build/README.md includes info about KUBE_BASE_IMAGE_REGISTRY
* build/root/Makefile contains the correct default value for KUBE_BASE_IMAGE_REGISTRY
2021-03-12 14:21:56 -08:00
Benjamin Elder
b7f1cf7683 remove bazel from the makefile 2021-03-07 13:01:17 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00