bump gocd-agent version to 16.6.0-3590 (#17311)

Update gocd-agent package version to 16.6.0-3590 including new sha.  Modify heapSize
and maxMemory mkOption to accurately reflect their intended purpose of configuring
initial java heap sizes.
This commit is contained in:
Shawn Warren 2016-08-10 10:10:13 -05:00 committed by Rok Garbas
parent 52a875fb23
commit 8750b4892e
3 changed files with 19 additions and 13 deletions

View File

@ -36,7 +36,7 @@ in {
}; };
packages = mkOption { packages = mkOption {
default = [ pkgs.stdenv pkgs.jre config.programs.ssh.package pkgs.nix ]; default = [ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ];
type = types.listOf types.package; type = types.listOf types.package;
description = '' description = ''
Packages to add to PATH for the Go.CD agent process. Packages to add to PATH for the Go.CD agent process.
@ -80,26 +80,26 @@ in {
''; '';
}; };
heapSize = mkOption { initialJavaHeapSize = mkOption {
default = "128m"; default = "128m";
type = types.str; type = types.str;
description = '' description = ''
Specifies the java heap memory size for the Go.CD agent java process. Specifies the initial java heap memory size for the Go.CD agent java process.
''; '';
}; };
maxMemory = mkOption { maxJavaHeapMemory = mkOption {
default = "256m"; default = "256m";
type = types.str; type = types.str;
description = '' description = ''
Specifies the java maximum memory size for the Go.CD agent java process. Specifies the java maximum heap memory size for the Go.CD agent java process.
''; '';
}; };
startupOptions = mkOption { startupOptions = mkOption {
default = [ default = [
"-Xms${cfg.heapSize}" "-Xms${cfg.initialJavaHeapSize}"
"-Xmx${cfg.maxMemory}" "-Xmx${cfg.maxJavaHeapMemory}"
"-Djava.io.tmpdir=/tmp" "-Djava.io.tmpdir=/tmp"
"-Dcruise.console.publish.interval=10" "-Dcruise.console.publish.interval=10"
"-Djava.security.egd=file:/dev/./urandom" "-Djava.security.egd=file:/dev/./urandom"

View File

@ -4,10 +4,15 @@
# 3. GoCD agent is available on GoCD server using GoCD API # 3. GoCD agent is available on GoCD server using GoCD API
# 3.1. https://api.go.cd/current/#get-all-agents # 3.1. https://api.go.cd/current/#get-all-agents
let
serverUrl = "localhost:8153/go/api/agents";
header = "Accept: application/vnd./go.cd/v2+json";
in
import ./make-test.nix ({ pkgs, ...} : { import ./make-test.nix ({ pkgs, ...} : {
name = "gocd-agent"; name = "gocd-agent";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ swarren83 ]; maintainers = [ grahamc swarren83 ];
}; };
nodes = { nodes = {
@ -29,6 +34,7 @@ nodes = {
$gocd_agent->waitForUnit("gocd-server"); $gocd_agent->waitForUnit("gocd-server");
$gocd_agent->waitForOpenPort("8153"); $gocd_agent->waitForOpenPort("8153");
$gocd_agent->waitForUnit("gocd-agent"); $gocd_agent->waitForUnit("gocd-agent");
$gocd_agent->waitUntilSucceeds("curl -s -f localhost:8153/go/api/agents -H 'Accept: application/vnd.go.cd.v2+json'"); $gocd_agent->waitUntilSucceeds("curl -s -f ${serverUrl} -H '${header}' | awk -F \" '/\"uuid\":\s\"[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}/ {print $4}'");
$gocd_agent->waitUntilSucceeds("curl -s -f ${serverUrl} -H '${header}' | awk -F \" '/\"agent_state\":\s\"Idle\"/'");
''; '';
}) })

View File

@ -2,19 +2,19 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "gocd-agent-${version}-${rev}"; name = "gocd-agent-${version}-${rev}";
version = "16.5.0"; version = "16.6.0";
rev = "3305"; rev = "3590";
src = fetchurl { src = fetchurl {
url = "https://download.go.cd/binaries/${version}-${rev}/generic/go-agent-${version}-${rev}.zip"; url = "https://download.go.cd/binaries/${version}-${rev}/generic/go-agent-${version}-${rev}.zip";
sha256 = "2cb988d36ec747b2917f3be040b430f2a8289c07353a6b6bdc95bf741fa1ed97"; sha256 = "ee076c62b388a6ed88d5065f18a4a96cb0d3161f693c16f920d85886d295ff27";
}; };
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A continuous delivery server specializing in advanced workflow modeling and visualization"; description = "A continuous delivery server specializing in advanced workflow modeling and visualization";
homepage = http://www.go.cd; homepage = http://www.go.cd;
license = licenses.asl20; license = licenses.asl20;
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ swarren83 ]; maintainers = with maintainers; [ grahamc swarren83 ];
}; };
buildInputs = [ unzip ]; buildInputs = [ unzip ];