Commit Graph

11 Commits

Author SHA1 Message Date
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
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
e456c95fc2
move FORCE target to Makefile
it looked out of place in git.mk

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-21 16:34:30 +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
Maël Valais
b150828a5b make: bin/release-version needs to be rebuilt every time
We use FORCE instead of .PHONY because this is a real file that can be
used as a prerequisite. If we were to use .PHONY, then the file's
timestamp would not be used to check whether targets should be rebuilt,
and they would get constantly rebuilt.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-02-25 17:30:48 +01:00
Maël Valais
b33c50342c make: fix "release-version" description
Signed-off-by: Maël Valais <mael@vls.dev>
2022-02-25 16:38:53 +01:00
Maël Valais
6e5bf073c2 make: explain why the target "bin/release-version" exists
Signed-off-by: Maël Valais <mael@vls.dev>
2022-02-25 16:38:53 +01:00
Maël Valais
3f7bac6ad3 make: rebuild images when a different commit is checked out
When switching branches, the Go files may not change. But since the
images contain the commit hash, e.g.:

  cert-manager-controller-amd64:v1.7.0-beta.0-142-gfc0819af6

It is surprising when trying to deploy to Kind: the git commit that is
checked out does not match the commit hash of the image.

To avoid confusion, I added bin/release-version that gets updated only
when the currently checked out commit changes.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-02-25 16:38:53 +01: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
Ashley Davis
32d716654a
Add a makefile flow for building artifacts
Includes targets for:

- all "server" binaries, for all arches
- all containers for all server binaries for all arches
- all client binaries (kubectl plugin / cmctl) for all arches
- the cert-manager helm chart + signature
- the cert-manager static manifests + CRDs
- tools which bazel would download, with checksum verification
- (commented out) a signed SHA256SUM file for client binaries

Upgrades from the bazel flow include that:

- we use OS-specific base images rather than just using amd64 everywhere
- we easily add support for signing artifacts at build time
- we add ".exe" to the end of windows executables
- we add a zip file for windows executables, for easier consumption
- we concatenate YAML files more robustly
- staging a full release should be much faster
- hopefully, it's easier to change things!
- licenses are trimmed down to reduce bloat in images (the license
  bundle was 1.4MB in size alone)

Changes from the bazel flow include:

- containers no longer have a symlink to the binary at an unusual
  path, but instead just have the binary at a more predictable path
  (e.g. /app/cmd/webhook/webhook instead of
  /app/cmd/webhook/webhook.runfiles/com_github_jetstack_cert_manager/cmd/webhook/webhook_/webhook)

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2021-12-15 09:54:15 +00:00