-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Bazel -> Make Migration Tracker #4712
Copy link
Copy link
Closed
Description
This is a tracker issuer for the migration from bazel to make.
Goals
- There will be promoted one way to build + test cert-manager; that one way is make.
- Wherever possible we rely on the standard go toolchain -
go build,go test. Make is an interface to those tools. Devs will be able to use those tools in places and skip usingmake, but ideally they use make. - The entire CI process with everything included can be run on a developer laptop on a supported platform - or in CI environments - using exactly one
makecommand. - For any CI job we wish to define, there's exactly one
makecommand to invoke it. CI config is done through environment variables, but commands to b run are defined inmakein the main cert-manager repo. - All bazel files will be removed, all references to bazel will be removed. Applies to the website too.
- For any test not under the
test/directorygo testshould work as expected on a clean checkout of the repo. - For any given go package - including integration, e2e, and unit tests - there will be a way of invoking only that test package, through make. This will include provisioning any dependencies (e.g.
make test-integration-ctl). These tests might not work on a clean checkout of the repo usinggo test. - The
Makefileat the root of the repo will be replaced bymake/Makefilewhen we're ready to start deleting bazel stuff. This is preferable to typingmake -f make/Makefile ...for everything. (done in Make: move the end-to-end tests from Bazel to Make with the new commands "make e2e-setup" and "make e2e" #4914)
Commands We Want
The names here aren't important; what's important is the intent of each command. A broad aim is "if bazel can do it, add a make target for it". It's not useful to try to enumerate every possible command here.
-
make ci-presubmit- everything we want to run on a presubmit. -
make test- run unit and integration tests usinggotestsum(people can fall back to using go test manually) -
make test-ci- run unit and integration tests usinggotestsumand produce a JUnit XML output to$ARTIFACTS/test-ci.xml -
make unit-test- all tests which don't need any other dependency (go test cmd pkg internal) -
make integration-test- all tests which do need an external dependency of some kind (except e2e tests) -
make e2e- e2e test run using ginkgo -
make e2e-ci K8S_VERSION=1.18- e2e test run using ginkgo and output JUnit XML to$ARTIFACTS/test__i.xml
Broad Plan of Action
Since #5242 merged, we've basically replaced most of bazel. We can remove most references to it in tests, and basically every operation an end user might want to take is now possible in make.
At this point, the remaining tasks are largely stragglers.
Tasks
- Makefile flow #4554 (Initial makefile PR, mostly for building artifacts)
- Move versionchecker tests to test/integration #4728 (move versionchecker tests to integration, part of allowing
go test ./pkg/...) - move RFC2136 DNS01 tests to test/integration #4730 (move rfc2136 DNS-1 tests to integration, part of allowing
go test ./pkg/...) - Move integration tests to test/integration #4736: move integration tests from
internaltotest/integration - Add kubebuilder tools in make for integration tests #4753: Install etcd and kube-apiserver for integration tests
- Add a build tag for the e2e test only #4755: Add a build tag for e2e tests
- Ginkgo install: Add install for ginkgo which is used for e2e tests #4714 (followed by Install ginkgo version from go.mod rather than specifying an explicit version #4717)
- Allow helm chart verification in both bazel + make #4723 : Add helm chart verification target callable by make
- Add target for running unit tests
- Add target for running integration tests (maybe move some straggling integration tests from
pkg/->test/) - Add target for running e2e tests
- Bonus, add goimports: Add goimports verification and skeleton ci presubmit check #4710
- Bonus, required for 4565: Match upstream boilerplate verification for files w/ go:build #4715
- Add CRD + Codegen #5242: Adds missing CRD / codegen targets
- Implement license verification in make #5243: License verification in make; bonus: changes format of LICENSES file
- Don't run unit/integration tests with bazel where we use make testing#702: Removing bazel tests part 1
- Don't test using bazel on master testing#710: Removing bazel tests part 2
- Removes pull-cert-manager-deps test from required tests testing#711: Removing bazel from tests part 3
- Updates developer documentation to give examples of using make website#1023: add developer documentation for make to the website
- Make update-all & ensure bazel-only targets are runnable #5251: Cleaning up various
hackscripts - Port upgrade test to make #5252: Upgrade test ported to use make - also changes to use new chart verification target
- Update upgrade test to reference new target testing#712: Final presubmit updates for bazel
Closed / Rejected
- Mark integration / e2e test files with a build tag #4565 (first attempt to unbreak
go test, rejected for an alternative approach)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels