Commit Graph

38 Commits

Author SHA1 Message Date
Tim Ramlot
ad21989f12
improve Makefile generate and verify targets (make them parallelizable)
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-04-24 16:32:19 +02:00
Tim Ramlot
eb3b832f7a
add go makefile module
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-04-22 15:56:30 +02:00
Tim Ramlot
8ee7ada5fa
running make in a make target causes concurrent download of dependencies yielding broken files and downloads
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-04-18 14:43:40 +02:00
Tim Ramlot
01b298a580
move to Makefile modules
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-04-10 18:53:40 +02:00
Tim Ramlot
8f7af98772
remove testgroup CRD scripts
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-02-12 11:11:33 +01:00
Tim Ramlot
b8759139a2
rename BINDIR to bin_dir in preparation for makefile modules
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-02-08 15:57:34 +01:00
Ashley Davis
8c1369726a
add CI check for updated helm docs
also updates helm docs!

Signed-off-by: Ashley Davis <ashley.davis@venafi.com>
2024-02-01 15:37:19 +00:00
Tim Ramlot
1ac2c17361
remove all versionchecker makefile logic
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-01-29 11:50:09 +01:00
Tim Ramlot
7b94868513
remove cmctl from this repo
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-01-24 16:15:34 +01:00
Adam Talbot
af4685c595 feat: update chart README using autogenerated docs
Signed-off-by: Adam Talbot <adam.talbot@venafi.com>
2024-01-15 10:25:23 +00:00
Ashley Davis
b3b14fda41
add separate startupapicheck binary
Signed-off-by: Ashley Davis <ashley.davis@venafi.com>
2024-01-02 17:17:50 +00:00
Ashley Davis
dd61635f3b
add target + installation for golangci-lint
This lets users locally run the same commands that are run in CI

Signed-off-by: Ashley Davis <ashley.davis@venafi.com>
2023-12-13 19:58:01 +00:00
Tim Ramlot
9d2d1cd6ef
add openapi definitions to acme API server
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-08-23 14:12:51 +02:00
Tim Ramlot
2ba39e9ebc
allow importing the ctl cmd package
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-05-12 14:13:04 +02:00
Ashley Davis
ab8c4c957f
update cmrel version to enable new module validation flags
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2023-05-10 15:25:13 +01:00
Ashley Davis
408d175328
Use boilersuite instead of python
Removes python boilerplate checker, updates our other use of boilerplate
templates and adds installation for boilersuite.

(also removes some redundant curl args when installing kind)

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2023-04-28 09:46:47 +01:00
Tim Ramlot
5b955355bd
update update-licenses make target: it now removes all the LICENSES files before generating them, ensuring us they are all regenerated
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-04-11 10:06:18 +02:00
Ashley Davis
6ce6ae839e
separate binaries/tests into separate modules with minimal dependencies
also add gomod validation in CI, along with a cmrel version bump

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2023-04-05 10:30:39 +01:00
Ashley Davis
f3a051d94f
add license preludes for a variety of files
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2023-03-14 15:46:10 +00:00
Ashley Davis
79bd127d3b
remove verify-licenses from ci-presubmit
see https://github.com/cert-manager/release/pull/111

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-12-06 16:40:20 +00:00
Tim Ramlot
5802b3a963 use variables for binaries
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2022-08-26 07:43:17 +00:00
Ashley Davis
18e98ce3da
move legacy targets to legacy.mk
we don't _need_ to remove these and we can keep them around for
longer, but we don't need them to be in files we actually use and edit.

putting the targets in a separate file feels cleaner!

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-30 22:35:45 +01:00
Ashley Davis
ca35696244
add make-based upgrade test
This uses cmctl instead of kubectl_cert-manager, uses make instead of
bazel and fixes an incorrect container name in
test/fixtures/upgrade/overlay/cainjector-ops.yaml

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-30 22:35:39 +01:00
Ashley Davis
642161a963
make update-all & ensure bazel-only targets are runnable
this allows us to maintain the bazel build files until they're removed,
but tries to avoid accidentally encouraging their use

`make update-all` implementes a non-bazel version of
`hack/update-all.sh`, with `hack/update-all.sh` now calling make but
also doing the bazel stuff it used to.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-30 12:47:30 +01:00
Ashley Davis
2c9344e316
Don't require python to be installed for everything
We only use python in one place and probably won't start using it more
without some kind of policy change. We don't need to require that everyone
has it installed, and can instead only require it for people who're running
the boilerplate check

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-28 15:57:39 +01:00
Ashley Davis
6eb1be3636
make verify_deps is now a no-op
this will allow tests to pass until we remove the pull-cert-manager-deps test

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-28 09:28:01 +01:00
Ashley Davis
f8c1ebe2d8
add make verifier / updater for LICENSES
Uses go-licenses to create a CSV file which replaces LICENSES.

The replacement is much smaller and easier to parse for both humans
and for machines.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-28 09:27:54 +01:00
Ashley Davis
eccde015ac
add CRD generation to makefile, replacing bazel
- includes a run of make update-crds which causes some trivial changes
- updates version of YQ to latest
- makes hack/update-crds.sh just call make
- makes hack/verify-crds.sh just call make
- moves functionality of hack/verify-crds.sh to hack/check-crds.sh,
  using the makefile for generating alternative CRDs for comparison
- removes the bazel test associated with CRDs

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-27 13:25:18 +01:00
Ashley Davis
22c0f45e22
add a make variant for codegen tools
- runs "make update-codegen"
- adds codegen verification to make tests
- changes hack/(update|verify)-codegen.sh to just call make
- removes bazel codegen test so it's not automatically run in CI

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-24 09:58:01 +01:00
Ashley Davis
35f2206404
change name of bin dir to _bin by default and make it a variable
This is needed because go and other tools will ignore directories
starting with "_" or "." but would treat a dir called "bin" as a regular
directory.

This in turn meant that when we vendored Go in bin, these tools would by
default scan the whole stdlib included with the bundled vendored go.

See https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns for details

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-21 16:34:26 +01:00
Ashley Davis
000d4307a7
don't verify chart in ci-presubmit
this test requires docker/podman, unlike other tests, and so requires other setup

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-05-12 16:29:27 +01:00
Ashley Davis
7ce1f9cffb
Improve "make help" output and add a couple of utility commands
- "make help" should be good enough for most people in most situations
  to build and test cert-manager
- "make clean-all" can be a one-stop-shop to start fresh.
- "make which-go" makes it clearer whether go vendoring is being used

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-05-11 13:35:28 +01:00
Ashley Davis
c205b4d74f
make verify-chart-version respect CTR in makefile
this allows podman to be used instead of docker

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-05-11 12:10:36 +01:00
Maël Valais
3405edf821 make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e'
The commands can be run concurrently, with the exception of e2e that
has to be run after e2e-setup is done. The e2e target does not check
whether cert-manager and the addons are installed.

The two only scripts that were kept are:

- make/e2e.sh      (previously called ./devel/run-e2e.sh)
- make/cluster.sh  (previsouly called ./devel/cluster/create.sh)

The reason for the removal of the other scripts is that they didn't
have that much logic and could easily ported to Make, improving greatly
the execution speed thanks to make's concurrency.

make/e2e.sh now behaves "as expected" when using -ginkgo.focus or
GINKGO_FOCUS; previously, the logs would not be shown before the end
of the test.

make/cluster.sh has lost the ability to create an OpenShift 3.11 cluster.
for running the end-to-end tests. The two reasons are that OpenShift 4
wasn't supported by the script devel/cluster/create.sh, and OpenShift
3.11 is not supported by cert-manager anymore.

The Makefile targets that were used in the Prow jobs (verify, verify_deps,
verify_chart, verify_upgrade, and cluster) have been kept around. They
now show a warning to encourage people to use the new Make-based targets.
When running one of the deprecated targets the Makefile won't check the
presence of the system tools such as Go and jq, since Bazel takes care of
these dependencies.

On version change, downloaded tools and images are re-downloaded. The
command 'make clean' now keeps the downloaded images and tools.

Note that a lot of attention has been put into having a Make system that works
flawlessly both on Linux and on BSDs (such as macOS).

You will note that some recursive calls to make are made, and $(MAKE)
instead of plain "make" is used in that case. If we didn't use $(MAKE),
we would have concurrency issues, and warnings such as:

  make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-13 12:32:08 +01:00
Ashley Davis
e22f30420b
add target for boilerplate verification in CI presubmits
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-03-05 16:37:26 +00:00
Ashley Davis
89d7742c56
add verify-errexit target to ci presubmits
Also modifies the script to run without bazel, and tweaks it so that
it'll detect errors in itself too.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-03-05 16:37:26 +00:00
Ashley Davis
ad998b35f8
Allow helm chart verification in both bazel + make
This slightly modifies our existing helm chart verification script to
accept the location of a tarball containing the chart we're verifying.

That in turn allows us to more generally use the script for both
validating the chart we build using make and the chart we build using
bazel.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-01-10 18:02:14 +00:00
Ashley Davis
1b3ac23659
add goimports verification and skeleton ci presubmit check
CI check will be built upon as Make is improved to reach testing partiy
with bazel

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-01-05 15:28:38 +00:00