Skip to content

Bazel -> Make Migration Tracker #4712

@SgtCoDFish

Description

@SgtCoDFish

This is a tracker issuer for the migration from bazel to make.

Goals

  1. There will be promoted one way to build + test cert-manager; that one way is make.
  2. 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 using make, but ideally they use make.
  3. 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 make command.
  4. For any CI job we wish to define, there's exactly one make command to invoke it. CI config is done through environment variables, but commands to b run are defined in make in the main cert-manager repo.
  5. All bazel files will be removed, all references to bazel will be removed. Applies to the website too.
  6. For any test not under the test/ directory go test should work as expected on a clean checkout of the repo.
  7. 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 using go test.
  8. The Makefile at the root of the repo will be replaced by make/Makefile when we're ready to start deleting bazel stuff. This is preferable to typing make -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 using gotestsum (people can fall back to using go test manually)
  • make test-ci - run unit and integration tests using gotestsum and 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

Closed / Rejected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions