summary refs log tree commit diff
diff options
context:
space:
mode:
authorYorick van Pelt <yorick@yorickvanpelt.nl>2018-09-06 14:02:55 +0200
committerFlorian Klink <flokli@flokli.de>2020-01-17 18:40:11 +0100
commite1ad9d16857d53aab8762249af7bd566856ed81a (patch)
treec42e6ef90d050a4918affab0d5eefc617b0f3ea8
parent8f19d7211313df46c30ab8b0748a6924e00c6874 (diff)
downloadnixpkgs-e1ad9d16857d53aab8762249af7bd566856ed81a.tar
nixpkgs-e1ad9d16857d53aab8762249af7bd566856ed81a.tar.gz
nixpkgs-e1ad9d16857d53aab8762249af7bd566856ed81a.tar.bz2
nixpkgs-e1ad9d16857d53aab8762249af7bd566856ed81a.tar.lz
nixpkgs-e1ad9d16857d53aab8762249af7bd566856ed81a.tar.xz
nixpkgs-e1ad9d16857d53aab8762249af7bd566856ed81a.tar.zst
nixpkgs-e1ad9d16857d53aab8762249af7bd566856ed81a.zip
nixos/buildkite-agent: add a shell attribute to specify the shell being used
This gets passed to BUILDKITE_SHELL, which will specify the shell being
used to executes script in.

Defaults to `${pkgs.bash}/bin/bash -e -c`, matching how buildkite
behaves on other distros.
-rw-r--r--nixos/modules/services/continuous-integration/buildkite-agent.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/services/continuous-integration/buildkite-agent.nix b/nixos/modules/services/continuous-integration/buildkite-agent.nix
index 3da1e5e79e2..00b881ffe3c 100644
--- a/nixos/modules/services/continuous-integration/buildkite-agent.nix
+++ b/nixos/modules/services/continuous-integration/buildkite-agent.nix
@@ -174,6 +174,14 @@ in
           instead.
         '';
       };
+
+      shell = mkOption {
+        type = types.str;
+        default = "${pkgs.bash}/bin/bash -e -c";
+        description = ''
+          Command that buildkite-agent 3 will execute when it spawns a shell.
+        '';
+      };
     };
   };
 
@@ -216,6 +224,7 @@ in
             token="$(cat ${toString cfg.tokenPath})"
             name="${cfg.name}"
             ${metaData}
+            shell="${cfg.shell}"
             build-path="${cfg.dataDir}/builds"
             hooks-path="${cfg.hooksPath}"
             ${cfg.extraConfig}