buildkite-agent3: init at 3.0.1 (#39471)

New stable release. Version 2.6 is kept for backwards compatibility.

https://github.com/buildkite/agent/releases/tag/v3.0.0
https://github.com/buildkite/agent/releases/tag/v3.0.1
This commit is contained in:
Rodney Lorrimar 2018-04-25 13:47:26 +01:00 committed by zimbatm
parent 8d58b1a0a0
commit ca7d983999
4 changed files with 36 additions and 14 deletions

View File

@ -0,0 +1,12 @@
{ callPackage, fetchFromGitHub, ... } @ args:
callPackage ./generic.nix (args // rec {
src = fetchFromGitHub {
owner = "buildkite";
repo = "agent";
rev = "v${version}";
sha256 = "07065hhhb418w5qlqnyiap45r59paysysbwz1l7dmaw3j4q8m8rg";
};
version = "2.6.10";
hasBootstrapScript = true;
})

View File

@ -0,0 +1,12 @@
{ callPackage, fetchFromGitHub, ... } @ args:
callPackage ./generic.nix (args // rec {
src = fetchFromGitHub {
owner = "buildkite";
repo = "agent";
rev = "v${version}";
sha256 = "09smyrzp1xkczlmh8vqb7bmjb2b5d6yf9birjgaw36c6m44bpfvs";
};
version = "3.0.1";
hasBootstrapScript = false;
})

View File

@ -1,19 +1,13 @@
{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, coreutils, git, openssh, bash, gnused, gnugrep }:
{ stdenv, buildGoPackage, makeWrapper, coreutils, git, openssh, bash, gnused, gnugrep
, src, version, hasBootstrapScript
, ... }:
let
version = "2.6.10";
goPackagePath = "github.com/buildkite/agent";
in
buildGoPackage {
name = "buildkite-agent-${version}";
inherit goPackagePath;
src = fetchFromGitHub {
owner = "buildkite";
repo = "agent";
rev = "v${version}";
sha256 = "07065hhhb418w5qlqnyiap45r59paysysbwz1l7dmaw3j4q8m8rg";
};
inherit goPackagePath src;
nativeBuildInputs = [ makeWrapper ];
@ -22,18 +16,20 @@ buildGoPackage {
noAuditTmpdir = stdenv.isLinux;
postInstall = ''
${stdenv.lib.optionalString hasBootstrapScript ''
# Install bootstrap.sh
mkdir -p $bin/libexec/buildkite-agent
cp $NIX_BUILD_TOP/go/src/${goPackagePath}/templates/bootstrap.sh $bin/libexec/buildkite-agent
sed -e "s|#!/bin/bash|#!${bash}/bin/bash|g" -i $bin/libexec/buildkite-agent/bootstrap.sh
''}
# Fix binary name
mv $bin/bin/{agent,buildkite-agent}
# These are runtime dependencies
wrapProgram $bin/bin/buildkite-agent \
--prefix PATH : '${stdenv.lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}' \
--set BUILDKITE_BOOTSTRAP_SCRIPT_PATH $bin/libexec/buildkite-agent/bootstrap.sh
${stdenv.lib.optionalString hasBootstrapScript "--set BUILDKITE_BOOTSTRAP_SCRIPT_PATH $bin/libexec/buildkite-agent/bootstrap.sh"} \
--prefix PATH : '${stdenv.lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}'
'';
meta = with stdenv.lib; {
@ -47,7 +43,7 @@ buildGoPackage {
'';
homepage = https://buildkite.com/docs/agent;
license = licenses.mit;
maintainers = with maintainers; [ pawelpacana zimbatm ];
maintainers = with maintainers; [ pawelpacana zimbatm rvl ];
platforms = platforms.unix;
};
}

View File

@ -7592,7 +7592,9 @@ with pkgs;
buildbot-ui = buildbot.withPlugins (with self.buildbot-plugins; [ www ]);
buildbot-full = buildbot.withPlugins (with self.buildbot-plugins; [ www console-view waterfall-view grid-view wsgi-dashboards ]);
buildkite-agent = callPackage ../development/tools/continuous-integration/buildkite-agent { };
buildkite-agent = buildkite-agent2;
buildkite-agent2 = callPackage ../development/tools/continuous-integration/buildkite-agent/2.x.nix { };
buildkite-agent3 = callPackage ../development/tools/continuous-integration/buildkite-agent/3.x.nix { };
byacc = callPackage ../development/tools/parsing/byacc { };