Commit Graph

92 Commits

Author SHA1 Message Date
irbekrm
5bfdd3c0c6 Always save e2e test logs
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-27 18:32:51 +01:00
jetstack-bot
d7a3a39767
Merge pull request #5050 from jahrlin/master
trim leading ./ from release archives created by Make
2022-04-25 13:34:20 +01:00
irbekrm
b1e12841d1 Don't use --force option to install addons with helm
As that makes it impossible to re-run the installation commands

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-22 12:03:54 +01:00
irbekrm
d720d8e02b Fix kind cluster creation with kube 1.19 and 1.18
By specifying a different kind config that does not use an etcd flag that was only add in later etcd versions

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-21 12:36:33 +01:00
Joakim Ahrlin
ea5913e1c3 update tar command to trim paths for release manifests
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-04-14 11:11:18 +02:00
Joakim Ahrlin
0bb0e8dc20 add helpful comment to tar commands
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-04-14 11:09:38 +02:00
Joakim Ahrlin
25b3786e5d update tar commands to trim paths for cmctl
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-04-13 10:16:10 +02:00
Ashley Davis
db8c5387dd
bump base images
uses ./hack/latest-base-images.sh

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-04-08 10:43:55 +01:00
Ashley Davis
c29f3e4aec
fix target when building containers for release
the bundles target is incorrect in a release since it won't generate
release metadata which we require when publishing a release

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-03-31 12:50:18 +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
555544d23b make: avoid the message "warning: undefined variable 'CI'"
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-30 11:04:10 +02:00
jetstack-bot
65d3a1c89e
Merge pull request #4968 from maelvls/make-and-appversion
make: the AppVersion and AppGitCommit weren't set
2022-03-29 13:53:52 +01:00
Ashley Davis
d43a5e8eb8
use absolute path of cmrel
fixes the breakage created by https://github.com/cert-manager/cert-manager/pull/4988

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-03-29 11:26:52 +01:00
Maël Valais
15c19384b7 make: prevent "warning: undefined variable 'CI'"
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 11:26:37 +02:00
Maël Valais
ae0632c1f0 make: add "make e2e-setup-kind-update-images"
I think having a separate file for storing the various kind image
digest isn't necessary. From now on, make/cluster.sh is the "source of
truth" for everything related to kind. If you would like to see the
image that is going to be used for creating the kind cluster, you can
run:

  make/cluster.sh --show-image

To self-update the digests with the latest available digests, run:

  make/cluster.sh --update-images

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 11:26:37 +02:00
Maël Valais
c4e6ebd1a8 make/cluster.sh: remove the fixed clusterIP CIDR 10.0.0.0
The fixed CIDR isn't necessary anymore since the makefile figures the
ClusterIP dynamically. This change also enables you to run
make/cluster.sh with an existing kind cluster.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 11:26:37 +02: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
057ce50ace make/cluster.sh: speedup etcd by using --unsafe-no-fsync
Using --unsafe-no-fsync is OK for development deployments of etcd [1].
etcd relies on fsync for its consensus protocol.

 [1]: https://github.com/etcd-io/etcd/pull/11946
 [2]: https://etcd.io/docs/v3.5/tuning/#disk
 [3]: https://etcd.io/docs/v3.5/faq/

Signed-off-by: Maël Valais <mael@vls.dev>
Co-authored-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2022-03-29 10:54:26 +02:00
Maël Valais
8b95a13078 make/e2e.sh: raise concurrency from 10 to 20
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
a9c225d573 make: e2e-setup-kind now properly prepulls image before "kind create"
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +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
10c4aa808f make: preload-kind-image now caches the kind image in "bin/downloaded"
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
f8187d17f2 make: e2e-setup-certmanager: fix the acmesolver image
The default value for --acme-http01-solver-image was off.

 quay.io/jetstack/cert-manager-acmesolver:v1.7.0-beta.0-260-gd0abb71ef0a78d
 <-------------------------------------->
           incorrect

 cert-manager-acmesolver-amd64:v1.7.0-beta.0-260-gd0abb71ef0a78d
 <--------------------------->
           correct

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
fbb372a1a4 make/cluster.sh: don't display the networking info, it isn't helpful
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
37628bf0ed make: e2e-setup-sampleexternalissuer: bump from v0.0.0-30 to v0.1.1
Not sure how the end-to-end tests were ever able to run previously. My
guess: the sample-external-issuer end-to-end suite is disabled.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
b33f5280a8 make/e2e.sh: the "trace" func was showing quotes in the wrong place
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
5be97dd755 make: re-add GOFLAGS to samplewebhook and pebble
I had removed GOFLAGS because I had added -X directives (for filling in
AppVersion and AppGitCommit) to GOFLAGS. It seems like go tool link does
not care whether the symbol exists or not, so it seems OK to use the
same GOFLAGS to build the samplewebhook and pebble even though the -X
directives don't make sense for them.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-25 20:44:04 +01:00
Maël Valais
de5c0bf381 make: the AppVersion and AppGitCommit weren't set
When checking how User-Agent headers would differ from v1.7.1 to
v1.8.0, The User-Agent looked off:

    cert-manager-issuers/v1.8.0 (linux/amd64) cert-manager/

The ending "/" should be followed by the git commit hash. It seems like
we forgot to port what Bazel does to fill AppVersion, AppGitCommit, and
AppGitState. This commit adds this feature to the Makefile. The
User-Agent should now look like this:

    cert-manager-issuers/v1.8.0 (linux/amd64) cert-manager/9dd5f6c85fde2c3ed58cd6c9e465bb5a4c1ca2b2
                 <----->
                This part depends
                on the component.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-25 20:44:04 +01:00
jetstack-bot
7091eaabd8
Merge pull request #4985 from SgtCoDFish/bumpbase
Bump base images to latest versions
2022-03-25 18:50:21 +00:00
Maël Valais
904a00fefb make: tools version is now properly switched when switching branches
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-25 18:03:35 +01:00
Maël Valais
c6f1f9bc24 make: in CI, copy binaries from "bin/downlaoded" to "bin/tools"
This is to work around the fact that binaries in hostPath-mounted
directories cannot be executed even if the permissions are correct.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-25 18:01:54 +01:00
Ashley Davis
d9d960e5f7
bump base images to latest versions
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-03-25 12:04:34 +00:00
Ashley Davis
5d17ec5d2d
add a build source indicator to metadata
This makes it easier to tell when a build was made by the makefile
workflow and therefore to adjust `cmrel publish` to adapt to changes

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-03-21 21:37:03 +00:00
Ashley Davis
a2a5f3f564
clear up the release target a little, ensure all things are built
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-03-18 16:24:20 +00:00
Ashley Davis
e3c3939113
some small QoL tweaks in makefiles
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-03-18 16:14:46 +00:00
Ashley Davis
968aeed6d7
fix phony names for some targets
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-03-18 14:45:50 +00:00
Maël Valais
d30f47293d make: warn people about e2e-setup-traefik and e2e-setup-haproxyingress
These two targets are not used by our end-to-end tests meaning that they
may either be broken or removed in the future.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-16 17:51:44 +01:00
Joakim Ahrlin
ff2d82f381 make: e2e-setup-haproxyingress: add haproxyingress arm64 image
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-03-16 17:51:27 +01:00
Maël Valais
56888639fd make: e2e-setup-traefik: fix dditionalArguments -> additionalArguments
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-16 14:06:55 +01:00
Maël Valais
9c8cf7564b docs: suggest -j8 instead of -j to avoid fork bombs
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-16 14:05:07 +01:00
Maël Valais
3ed6ba3621 docs: mention direnv with export PATH=bin/tools
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-16 14:03:38 +01:00
Maël Valais
3f8f12a7af make: remove comments I re-added when moving release_containers.mk to release.mk
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-16 13:53:42 +01:00
Maël Valais
82190e7656 make: e2e-setup: pebble can now be built on M1 macs
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-16 13:30:21 +01: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
48a31521b3 make: vendor-go wasn't run before e2e-setup
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-15 15:55:19 +01:00
Maël Valais
9e56f63b0f make: e2e-setup: use eafxx/bind instead of sameersbn/bind
eafxx's container images are multi-arch which means M1 macs can run
bind on Colima.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-14 21:25:19 +01:00
Maël Valais
5b3b8a83ef make: e2e: add CGO_ENABLED=0 to make/e2e.sh
This is because we are running these tests in a non-libc container
(alpine) which means we can't use CGO.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-14 17:18:51 +01:00