Skip to content

Commit

Permalink
Pass 'package_name' as 'binary' to runner define for proper execution…
Browse files Browse the repository at this point in the history
… of the runner registration
  • Loading branch information
dandunckelman committed Sep 27, 2017
1 parent c7f9bd5 commit e1747fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions manifests/cirunner.pp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
$runners = keys($runners_hash)
$default_config = hiera_hash($hiera_default_config_key, {})
gitlab::runner { $runners:
binary => $package_name,
default_config => $default_config,
runners_hash => $runners_hash,
require => Exec['gitlab-runner-restart'],
Expand Down
4 changes: 3 additions & 1 deletion manifests/runner.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
# Copyright 2015 Tobias Brunner, VSHN AG
#
define gitlab::runner (
$binary,
$runners_hash,
$default_config = {},
) {

validate_string($binary)
validate_hash($runners_hash)
validate_hash($default_config)

Expand All @@ -48,7 +50,7 @@

# Execute gitlab ci multirunner register
exec {"Register_runner_${title}":
command => "/usr/bin/gitlab-ci-multi-runner register -n ${parameters_string}",
command => "/usr/bin/${binary} register -n ${parameters_string}",
unless => "/bin/grep ${runner_name} ${toml_file}",
}

Expand Down

0 comments on commit e1747fe

Please sign in to comment.