diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/fix-shell-path.patch b/pkgs/development/tools/continuous-integration/gitlab-runner/fix-shell-path.patch index 8f71f9ed630c..8aa419ea5f94 100644 --- a/pkgs/development/tools/continuous-integration/gitlab-runner/fix-shell-path.patch +++ b/pkgs/development/tools/continuous-integration/gitlab-runner/fix-shell-path.patch @@ -1,16 +1,16 @@ diff --git a/shells/bash.go b/shells/bash.go -index 839b7781..2b478e1e 100644 +index 673f4765..a58cc5e2 100644 --- a/shells/bash.go +++ b/shells/bash.go -@@ -7,6 +7,7 @@ import ( - "gitlab.com/gitlab-org/gitlab-ci-multi-runner/common" - "gitlab.com/gitlab-org/gitlab-ci-multi-runner/helpers" +@@ -5,6 +5,7 @@ import ( + "bytes" + "fmt" "io" + "os/exec" "path" "runtime" "strconv" -@@ -208,7 +209,11 @@ func (b *BashShell) GetConfiguration(info common.ShellScriptInfo) (script *commo +@@ -225,7 +226,11 @@ func (b *BashShell) GetConfiguration(info common.ShellScriptInfo) (script *commo if info.User != "" { script.Command = "su" if runtime.GOOS == "linux" { @@ -22,4 +22,7 @@ index 839b7781..2b478e1e 100644 + script.Arguments = append(script.Arguments, "-s", shellPath) } script.Arguments = append(script.Arguments, info.User) - script.Arguments = append(script.Arguments, "-c", shellCommand) \ No newline at end of file + script.Arguments = append(script.Arguments, "-c", shellCommand) +-- +2.18.0 + diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/v1.nix b/pkgs/development/tools/continuous-integration/gitlab-runner/v1.nix deleted file mode 100644 index 33cbd23d062c..000000000000 --- a/pkgs/development/tools/continuous-integration/gitlab-runner/v1.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ lib, buildGoPackage, fetchFromGitLab, fetchurl, go-bindata }: - -let - version = "1.11.5"; - # Gitlab runner embeds some docker images these are prebuilt for arm and x86_64 - docker_x86_64 = fetchurl { - url = "https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/v${version}/docker/prebuilt-x86_64.tar.xz"; - sha256 = "0qy3xrq574c1lhkqw1zrkcn32w0ky3f4fppzdjhb5zwqvnaz7kx0"; - }; - - docker_arm = fetchurl { - url = "https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/v${version}/docker/prebuilt-arm.tar.xz"; - sha256 = "12clc28yc157s2kaa8239p0g086vq062jfjh2m1bxqmaypw9pyla"; - }; -in -buildGoPackage rec { - inherit version; - name = "gitlab-runner-${version}"; - goPackagePath = "gitlab.com/gitlab-org/gitlab-ci-multi-runner"; - commonPackagePath = "${goPackagePath}/common"; - buildFlagsArray = '' - -ldflags= - -X ${commonPackagePath}.NAME=gitlab-runner - -X ${commonPackagePath}.VERSION=${version} - -X ${commonPackagePath}.REVISION=v${version} - ''; - - src = fetchFromGitLab { - owner = "gitlab-org"; - repo = "gitlab-ci-multi-runner"; - rev = "v${version}"; - sha256 = "1xgx8jbgcc3ga7dkjxa2i8nj4afsdavzpfrgpdzma03jkcq1g2sv"; - }; - - patches = [ ./fix-shell-path.patch ]; - - buildInputs = [ go-bindata ]; - - preBuild = '' - ( - # go-bindata names the assets after the filename thus we create a symlink with the name we want - cd go/src/${goPackagePath} - ln -sf ${docker_x86_64} prebuilt-x86_64.tar.xz - ln -sf ${docker_arm} prebuilt-arm.tar.xz - go-bindata \ - -pkg docker \ - -nocompress \ - -nomemcopy \ - -o executors/docker/bindata.go \ - prebuilt-x86_64.tar.xz \ - prebuilt-arm.tar.xz - ) - ''; - - postInstall = '' - install -d $out/bin - # The recommended name is gitlab-runner so we create a symlink with that name - ln -sf gitlab-ci-multi-runner $bin/bin/gitlab-runner - ''; - - meta = with lib; { - description = "GitLab Runner the continuous integration executor of GitLab"; - license = licenses.mit; - homepage = https://about.gitlab.com/gitlab-ci/; - platforms = platforms.unix; - maintainers = [ lib.maintainers.bachp ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23b2b7ac91b0..907202e279f1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2792,7 +2792,6 @@ with pkgs; gitlab-ee = callPackage ../applications/version-management/gitlab { gitlabEnterprise = true; }; gitlab-runner = callPackage ../development/tools/continuous-integration/gitlab-runner { }; - gitlab-runner_1_11 = callPackage ../development/tools/continuous-integration/gitlab-runner/v1.nix { }; gitlab-shell = callPackage ../applications/version-management/gitlab-shell { };