summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-12-13 09:29:58 +0100
committermakefu <github@syntax-fehler.de>2021-12-13 09:29:58 +0100
commited065e8add0376384b8f23a016f0fedab13f7fd2 (patch)
tree1e596ac0432bb6d085d2861efee5f54bdea37e75 /krebs/3modules
parentd424c3f6af7c505d5ad64210d0a1b59af7483916 (diff)
parentf2533d88924feb48834a07c4dc1e82cd21acd025 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/ci.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/krebs/3modules/ci.nix b/krebs/3modules/ci.nix
index bb941a1fb..822dbab61 100644
--- a/krebs/3modules/ci.nix
+++ b/krebs/3modules/ci.nix
@@ -108,8 +108,21 @@ let
# create a ShellCommand for each stage and add them to the build
stages = self.extract_stages(self.observer.getStdout())
self.build.addStepsAfterCurrentStep([
- steps.ShellCommand(name=stage, command=[stages[stage]])
- for stage in stages
+ steps.ShellCommand(
+ name=stage,
+ env=dict(
+ build_name = stage,
+ build_script = stages[stage],
+ ),
+ command="${pkgs.writeDash "build.sh" ''
+ set -xefu
+ profile=${shell.escape profileRoot}/$build_name
+ result=$("$build_script")
+ if [ -n "$result" ]; then
+ ${pkgs.nix}/bin/nix-env -p "$profile" --set "$result"
+ fi
+ ''}",
+ ) for stage in stages
])
return result