commit | e2a302a9062d3ebfc33ad83dd382653e067ca009 | [log] [tgz] |
---|---|---|
author | Leopold <leo@monogon.tech> | Sun Jan 15 15:39:18 2023 +0100 |
committer | Leopold Schabel <leo@monogon.tech> | Thu Jan 19 19:07:21 2023 +0000 |
tree | 55165c3da49a1f7b4604c4db85b59bb305011718 | |
parent | 7fbf10455fd61b4c34182be5cdb3a53fd9897d4b [diff] |
metropolis/test/launch: convert :launch to a test "bazel run" simply executes the binary outside the sandbox, so swtpm and other dependencies from the sandbox sysroot won't be available. If swtpm is installed on the host, running the _bin target still works, but it's better to point contributors to something that works out of the box. This is a temporary workaround. Tests have timeouts and take the global Bazel server lock. The correct solution is a static swtpm build which can run outside the sandbox. Change-Id: Icf7bf5cc44825df676d37a75ea9c1e135de14fef Reviewed-on: https://review.monogon.dev/c/monogon/+/1078 Reviewed-by: Lorenz Brun <lorenz@monogon.tech> Tested-by: Jenkins CI
This is the main repository containing the source code for the Monogon Platform.
This is pre-release software - take a look, and check back later!
Our build environment is self-contained and requires only minimal host dependencies:
/dev/kvm
(if you want to run tests).Our docs assume that Bazelisk is available as bazel
on your PATH.
This repository is compatible with the IntelliJ Bazel plugin out of the box, which enables full autocompletion for external dependencies and generated code.
The following steps are necessary:
Install Google's Bazel plugin in IntelliJ.
Make sure that Bazel "Bazel Binary Location" in Other Settings → Bazel Settings points to Bazelisk.
Use File → Import Bazel project... and select your monorepo checkout.
After running the first sync, everything should now resolve in the IDE, including generated code.
Build CLI and node image:
bazel build //metropolis/cli/dbg //:launch -c dbg
Launch an ephemeral test node:
bazel test //:launch -c dbg --test_output=streamed
Run a kubectl command while the test is running:
bazel-bin/metropolis/cli/dbg/dbg_/dbg kubectl describe node
Run full test suite:
bazel test -c dbg //...