Skip to content

Commit

Permalink
Merge pull request #6 from icann-dns/DNSIN258_allow_concurrent_override
Browse files Browse the repository at this point in the history
cirunner: Allow users to override the concurrent concurrent
  • Loading branch information
b4ldr authored Jul 30, 2024
2 parents 8558373 + aa6a7ec commit 22af085
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions manifests/cirunner.pp
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# @summary This module installs and configures Gitlab CI Runners.
# @param conf_file path to the config file
# @param url the url to the gitlab server
# @param concurrent override the default number of concurrent job
# @param runners the hash of runners
#
class gitlab::cirunner (
String $conf_file = '/etc/gitlab-runner/config.toml',
String $url = 'https://gitlab.com',
Hash[String, String] $runners = {},
Optional[Integer[1]] $concurrent = undef,
Hash[String, String] $runners = {},
) {
$concurrent = $runners.size
$_concurrent = pick($concurrent, $runners.size)
$package_name = 'gitlab-runner'
ensure_packages([$package_name])

@@ -27,7 +29,7 @@
}
file_line { 'gitlab-runner-concurrent':
path => $conf_file,
line => "concurrent = ${concurrent}",
line => "concurrent = ${_concurrent}",
match => '^concurrent = \d+',
notify => Exec['gitlab-runner-restart'],
}

0 comments on commit 22af085

Please sign in to comment.