Commit Graph

27 Commits

Author SHA1 Message Date
Richard Wall
7ee4c0b1e1 Use the correct path in the the example command
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2023-06-27 12:49:13 +01:00
Richard Wall
cc0782b917 Reduce binary size by stripping dwarf tables and symbol tables
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2023-06-27 12:47:08 +01:00
Richard Wall
87b3e321c8 Disable CGO when compiling an e2e.test binary
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2023-06-27 12:46:31 +01:00
Tim Ramlot
d602087446
remove Helm burst limit
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-04-11 14:51: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
73bdee6e42
fix upstream tags generation to use sorting
also changes upstream tags to have a version suffix so it can be
manually bumped

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2023-04-04 13:39:11 +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
Richard Wall
9bf2fed7d6 A Makefile target to build a standalone E2E test binary
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2023-02-15 14:32:40 +00:00
jetstack-bot
3d6534120c
Merge pull request #5403 from jahrlin/always-upload-kind-logs
move e2e-ci to a script
2022-08-29 10:10:03 +01: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
Joakim Ahrlin
58de2e57a8 move e2e-ci to a script
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-08-25 14:28:34 +02:00
Tim Ramlot
ba9a6bd5b3 add pruning logic for gotestsum junit xml output
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2022-08-04 11:15:18 +00: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
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
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
7ea4496dcb
Gracefully handle 404s when fetching old CRDs
If we're in the middle of a cert-manager release we'll have a git tag
created for that release, but won't have a GitHub release created yet.
That means that an attempt to download old CRDs for our versionchecker
test will fail for that version, with a 404 error.

An alternative approach would be to use the GitHub API to query for
existing non-draft releases - but that introduces a new point of failure
whereby we can easily hit a rate limit, or else introduces the need for
a GitHub API token.

The GitHub API also has the issue that it doesn't present every release
in one API call, which complicates fetching releases using curl and uses
even more rate-limit capacity.

The approach here is simple; we ignore tags for which the release 404s,
download manifests for which the release gives a 200, and bubble up any
other errors.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-03-30 15:16:17 +01:00
Maël Valais
6c57633884 make: remove the not-really-needed system dependency "perl"
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:54:26 +02:00
Maël Valais
88c29358d5 make: test-ci's XML output is a bit more readable now
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
f70baa8d3c make: test-ci: hide fuzz_xxxx test results in the JUnit XML
The Prow UI can't handle that many test cases (over 40,000 test cases,
53,000 XML lines).

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
66aef65267 make: test-ci now writes JUnit XML to $ARTIFACTS/junit_make-test-ci.xml
Previously, the XML was saved to $ARTIFACTS, which was not picked up by
the Prow UI. The XML files must be of the form: junit_*.xml.

This format is required by our Spyglass configuration (Spyglass is the
name the Prow UI) [1].

[1]: https://github.com/jetstack/testing/blob/d04c4641f/config/config.yaml#L80-L81

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
0df0a2cf21 make: e2e-ci: export ARTIFACTS so that it goes to make/e2e.sh
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-15 17:04:25 +01:00
Maël Valais
029db6258f make: test-ci now tests $(WHAT), like "make test"
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-15 16:14:44 +01:00
Maël Valais
daf412c09d make: test-ci: xargs --max-procs doesn't exist in the busybox
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-14 16:47:43 +01:00
Maël Valais
8fd19044f2 make: integration-test: KUBEBUILDER_ASSETS needs to be absolute
It seems like Ginkgo isn't running from the root of the repository, that's why
it can't find binaries, e.g., bin/tools/etcd.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-13 12:32:08 +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
dadb2aa8a2
log latest known tag when prepping integration tests
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-18 16:43:37 +00:00
Ashley Davis
a57110c6bb
Add targets for unit and integration tests in make
These lean heavily on `go test` for everything possible.

Also adds setup for versionchecker test in make, and a script for
extracting CRDs from templated rendered YAML files

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-17 14:48:57 +00:00