commit | 822341ae63f435519b5329db3a9fe671fc48684c | [log] [tgz] |
---|---|---|
author | Leopold Schabel <leo@nexantic.com> | Mon Feb 03 21:51:47 2020 +0100 |
committer | Leopold Schabel <leo@nexantic.com> | Mon Feb 03 21:51:47 2020 +0100 |
tree | 9a00fa6f64850c8607975bd8e7279d257c3c6ac6 | |
parent | 731d00ae802712305d2a01ea4a7bbc74227b2f0d [diff] |
Manually invalidate image cache in CI Our objective is to ensure that the build always uses the latest Dockerfile for a given build, while minimizing rebuilds. A counter is explicit and can be used to intentionally invalidate the image cache, even if the the file's content did not change. The caching performed by `podman build` is not very clever - it's not shared between repositories, and is easily invalidated by successive builds with different versions of the Dockerfile. Garbage collection is not trivial, since there may be multiple in-flight revisions with different counters. Ref T506 Fixes T616 Test Plan: CI ;) Bug: T616, T506 X-Origin-Diff: phab/D373 GitOrigin-RevId: 5bfb8cd8b98175d645c904aee8e45402d0c049c7
This is the monorepo storing all of nexantic's internal projects and libraries.
We assume a Fedora host system provisioned using rW, and IntelliJ as the IDE.
For better reproducibility, all builds are executed in containers.
Spinning up: scripts/create_container.sh
Spinning down: scripts/destroy_container.sh
Running commands: scripts/run_in_container.sh <...>
Using bazel using a wrapper script: scripts/bin/bazel <...>
(add to your local $PATH for convenience)
This repository is compatible with the IntelliJ Bazel plugin. All commands run inside the container, and necessary paths are mapped into the container.
We check the entire .ijwb project directory into the repository, which requires everyone to use the latest version of both IntelliJ and the Bazel plugin, but eliminates manual setup steps.
The following steps are necessary:
Install Google's official Bazel plugin in IntelliJ.
Add the absolute path to your ~/.cache/bazel-nxt folder to your idea64.vmoptions (Help → Edit Custom VM Options) and restart IntelliJ:
-Dbazel.bep.path=/home/leopold/.cache/bazel-nxt
Set "Bazel Binary Location" in Other Settings → Bazel Settings to the absolute path of scripts/bin/bazel. This is a wrapper that will execute Bazel inside the container.
Open the .ijwb
folder as IntelliJ project.
Disable Vgo support for the project.
Run a non-incremental sync in IntelliJ
The plugin will automatically resolve paths for generated files.
If you do not use IntelliJ, you need to use the scripts/bazel_copy_generated_for_ide.sh script to copy files locally.