summary refs log tree commit diff
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2022-02-21 13:45:49 +0100
committerPascal Bach <pascal.bach@nextrem.ch>2022-02-23 17:04:30 +0100
commit5d2606d1f0ee0b723b073c8f7ea83cca1fdc9757 (patch)
treee701a5e28b3a403a553bc5148a909a189c1d5e57
parent3e7847061787ddcb8c33abc035f6effb801f05c9 (diff)
downloadnixpkgs-5d2606d1f0ee0b723b073c8f7ea83cca1fdc9757.tar
nixpkgs-5d2606d1f0ee0b723b073c8f7ea83cca1fdc9757.tar.gz
nixpkgs-5d2606d1f0ee0b723b073c8f7ea83cca1fdc9757.tar.bz2
nixpkgs-5d2606d1f0ee0b723b073c8f7ea83cca1fdc9757.tar.lz
nixpkgs-5d2606d1f0ee0b723b073c8f7ea83cca1fdc9757.tar.xz
nixpkgs-5d2606d1f0ee0b723b073c8f7ea83cca1fdc9757.tar.zst
nixpkgs-5d2606d1f0ee0b723b073c8f7ea83cca1fdc9757.zip
gitlab-runner: 14.7.0 -> 14.8.0
-rw-r--r--pkgs/development/tools/continuous-integration/gitlab-runner/default.nix37
1 files changed, 30 insertions, 7 deletions
diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix
index 57e9d15dce6..9c57c500592 100644
--- a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix
+++ b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix
@@ -1,31 +1,54 @@
-{ lib, buildGoPackage, fetchFromGitLab, fetchurl }:
+{ lib, buildGoModule, fetchFromGitLab, fetchurl }:
 
 let
-  version = "14.7.0";
+  version = "14.8.0";
 in
-buildGoPackage rec {
+buildGoModule rec {
   inherit version;
   pname = "gitlab-runner";
-  goPackagePath = "gitlab.com/gitlab-org/gitlab-runner";
-  subPackages = [ "." ];
-  commonPackagePath = "${goPackagePath}/common";
+
+  commonPackagePath = "gitlab.com/gitlab-org/gitlab-runner/common";
   ldflags = [
     "-X ${commonPackagePath}.NAME=gitlab-runner"
     "-X ${commonPackagePath}.VERSION=${version}"
     "-X ${commonPackagePath}.REVISION=v${version}"
   ];
 
+  vendorSha256 = "sha256-MdGLl77DFXPudt26qICSH+1UuQAR8Rb/nl0Ykb0hjgE=";
+
   src = fetchFromGitLab {
     owner = "gitlab-org";
     repo = "gitlab-runner";
     rev = "v${version}";
-    sha256 = "0l7bbmhvgz12nq52nmvgs1qmcknikw8f2dn9l93ijb1sr495fygl";
+    sha256 = "sha256-+DwOKlFu9m2kt4DwaSp/Jq3eZ/+FFxV1Q7bKOy5DfoE=";
   };
 
   patches = [
     ./fix-shell-path.patch
   ];
 
+  prePatch = ''
+    # Remove some tests that can't work during a nix build
+
+    # Requires to run in a git repo
+    sed -i "s/func TestCacheArchiverAddingUntrackedFiles/func OFF_TestCacheArchiverAddingUntrackedFiles/" commands/helpers/file_archiver_test.go
+    sed -i "s/func TestCacheArchiverAddingUntrackedUnicodeFiles/func OFF_TestCacheArchiverAddingUntrackedUnicodeFiles/" commands/helpers/file_archiver_test.go
+
+    # No writable developer environment
+    rm common/build_test.go
+    rm executors/custom/custom_test.go
+
+    # No docker during build
+    rm executors/docker/terminal_test.go
+    rm executors/docker/docker_test.go
+    rm helpers/docker/auth/auth_test.go
+  '';
+
+  preCheck = ''
+    # Make the tests pass outside of GitLab CI
+    export CI=0
+  '';
+
   meta = with lib; {
     description = "GitLab Runner the continuous integration executor of GitLab";
     license = licenses.mit;