Commit graph

5 commits

Author SHA1 Message Date
sterni
16a7c4a1be feat(buildkite): avoid building extraSteps in pipeline construction
In principle we don't want to build any (later) pipeline target during
pipeline evaluation insofar they appear in extraSteps. For this reason,
we have the needsOutput mechanism which prevents the parent target of an
extraStep from being built in 🦙.

Unfortunately, this mechanism is not general purpose enough, as we use
other (i.e. non parent) targets from depot in extraSteps. As a
consequence, kind of expensive builds need to happen during pipeline
construction at the moment. The solution is to use the fact that the
command script we want to run is exposed via the readTree interface to
depot and build the script proper only when the extra step is executed.

To facilitate this, some prerequisite changes need to be made:

- We need to use a symlink different to result in case needsOutput is
  true which needs support in mkBuildCommand. We also need to avoid this
  symlink being picked up by git, as many extra steps check whether the
  tree is dirty or not. (Is there a way to have it outside the depot
  tree?)

- Since we rely on the build command printing a single store path we
  store in $command_script, we need to avoid it printing two paths
  in cases where nix-store(1) is used (nix-store(1) prints the symlink
  and readlink(1) would print the store path in a separate line).

Future work would be to remove/deprecate the needsOutput mechanism:
After this change the parent target wouldn't be built right away even if
it appeared in the script via string interpolation. Thus we could,
instead of expecting the target being available as `./result`, make our
extra steps nix-ier.

Change-Id: Idd2e88a865eadabe229ce1e05406e8cc4cb63f94
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10850
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-03-07 15:39:56 +00:00
sterni
16da548f93 feat(.envrc): gcroot third_party.sources
This is a bit slower than I'd like, but acceptable.

Change-Id: I419b3c49201540de9d0ade1c6c2ac97758d8a811
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6576
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-09-15 11:27:53 +00:00
Vincent Ambo
e52eed3cd4 chore(gitignore): Ignore garbage/ folder
I use this folder locally to collect files that I am not committing to
the repository, but that might become relevant again at some point in
the future.
2019-12-20 20:05:40 +00:00
Vincent Ambo
86d8c748a7 chore: Catch all Nix results in gitignore 2019-09-02 17:12:06 +01:00
Vincent Ambo
f217564a2d chore: Add very basic .gitignore 2019-07-04 16:10:13 +01:00