mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
gitlab-runner-v1: remove v1 package (#47624)
It was required for gitlab < 9 which is not supported anymore since some time. While removinf the V1 the patch was refreshed to cleanly work with version 11.x
This commit is contained in:
parent
a3d86b49b4
commit
9dbb71b1d3
@ -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)
|
||||
script.Arguments = append(script.Arguments, "-c", shellCommand)
|
||||
--
|
||||
2.18.0
|
||||
|
||||
|
@ -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 ];
|
||||
};
|
||||
}
|
@ -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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user