about summary refs log tree commit diff
path: root/pkgs/development/tools/continuous-integration
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-04-21 02:04:17 +0200
committerGitHub <noreply@github.com>2022-04-21 02:04:17 +0200
commit4c344da29a5b46caadb87df1d194082a190e1199 (patch)
tree74e1ec999dbcdb0b0eaa64fc66c6da50d2a8306f /pkgs/development/tools/continuous-integration
parent76009b46487b5550a78c6f77d069cea4130275c4 (diff)
parent05d752888ee2c2351ba104df893b8bc8abcafb1e (diff)
Merge pull request #167170 from veehaitch/github-runner-node12
github-runner: guard support for Node.js 12
Diffstat (limited to 'pkgs/development/tools/continuous-integration')
-rw-r--r--pkgs/development/tools/continuous-integration/github-runner/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/development/tools/continuous-integration/github-runner/default.nix b/pkgs/development/tools/continuous-integration/github-runner/default.nix
index fe2c536f777fc..aa20eae8f19d2 100644
--- a/pkgs/development/tools/continuous-integration/github-runner/default.nix
+++ b/pkgs/development/tools/continuous-integration/github-runner/default.nix
@@ -13,13 +13,16 @@
 , linkFarmFromDrvs
 , lttng-ust
 , makeWrapper
-, nodejs-12_x
 , nodejs-16_x
 , openssl
 , stdenv
 , zlib
 , writeShellApplication
 , nuget-to-nix
+# Keeping this option until upstream removes support for EoL Node.js 12 entirely
+# Also refer to: https://github.com/actions/runner/pull/1716
+, withNode12 ? false
+, nodejs-12_x
 }:
 let
   nugetSource = linkFarmFromDrvs "nuget-packages" (
@@ -187,15 +190,17 @@ stdenv.mkDerivation rec {
     ++ lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [
       # "JavaScript Actions in Alpine containers are only supported on x64 Linux runners. Detected Linux Arm64"
       "GitHub.Runner.Common.Tests.Worker.StepHostL0.DetermineNodeRuntimeVersionInAlpineContainerAsync"
+    ]
+    ++ lib.optionals (!withNode12) [
+      "GitHub.Runner.Common.Tests.ProcessExtensionL0.SuccessReadProcessEnv"
     ];
-
   checkInputs = [ git ];
 
   checkPhase = ''
     runHook preCheck
 
     mkdir -p _layout/externals
-    ln -s ${nodejs-12_x} _layout/externals/node12
+    ${lib.optionalString withNode12 "ln -s ${nodejs-12_x} _layout/externals/node12"}
     ln -s ${nodejs-16_x} _layout/externals/node16
 
     printf 'Disabled tests:\n%s\n' '${lib.concatMapStringsSep "\n" (x: " - ${x}") disabledTests}'
@@ -244,7 +249,7 @@ stdenv.mkDerivation rec {
     # externals/node{12,16}. As opposed to the official releases, we don't
     # link the Alpine Node flavors.
     mkdir -p $out/externals
-    ln -s ${nodejs-12_x} $out/externals/node12
+    ${lib.optionalString withNode12 "ln -s ${nodejs-12_x} $out/externals/node12"}
     ln -s ${nodejs-16_x} $out/externals/node16
 
     # Install Nodejs scripts called from workflows