Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cirunner: Allow users to override the concurrent concurrent #6

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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])

Expand All @@ -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'],
}
Expand Down