Skip to content

Commit

Permalink
Completely refactor gitlab_ci_runner::runner
Browse files Browse the repository at this point in the history
Before this, the complete hash with all runners was injected into
gitlab_ci_runner::runner. Based on the title of the resource it was then
decided which runner should be extracted from the global hash and merge
with defaults ect.

This was completely refactored in a way that a single
gitlab_ci_runner::runner resource now only holds all data which is need
to configure it but no other.

This also changes the default of gitlab_ci_runner::runners(_defaults) to
an empty hash because I don't see why we need to force user to configure
it.

Move global options to toml generation

This drop the 'builds_dir' and cache_dir because they are runner
specific parameter rather than global ones.

The 'metrics_server' parameter gets dropped as well because it was
deprecated almost 2 years ago.

Furthermore, this commit introduce all missing global configuration
options which are 'log_level', 'log_format' and 'check_interval'.

Move runner configuration from exec to concat::fragment

This uses the foundation laid in
9ff7b03 and moves the runner
configuration from execs to concat::fragments. This was done to be able
to change (parts) of the runner configuration after the inital Puppet
run which is not possible with the exec because there is no config
update logic in the gitlab-runner binary.

Sadly this drops the support for autoregistering a runner on a Gitlab
instance as discussed in
voxpupuli#18.
The registration can be done with Bolt task provide in
voxpupuli#73.

move-to-concat - Move TOML creation to its own function

move-to-concat-deferred - Refactor to use a library

move-to-concat-deferred - bolt-tasks - Add register/unregister Puppet functions

move-to-concat-deferred - Allow $config['token'] to be a deferred function

move-to-concat-deferred - Allow auth and reg token to be retrieved by a Deferred function

move-to-concat-deferred - Don't depend on toml-rb, included the dumper.rb from their

move-to-concat-deferred - Save
  • Loading branch information
baurmatt committed Apr 7, 2020
1 parent 0e14c70 commit c01d949
Show file tree
Hide file tree
Showing 36 changed files with 1,536 additions and 303 deletions.
3 changes: 2 additions & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
fixtures:
repositories:
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
apt: "https://github.com/puppetlabs/puppetlabs-apt.git"
concat: "https://github.com/syseleven/puppetlabs-concat.git"
docker: "https://github.com/puppetlabs/puppetlabs-docker.git"
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
yumrepo_core:
repo: https://github.com/puppetlabs/puppetlabs-yumrepo_core.git
puppet_version: ">= 6.0.0"
3 changes: 3 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ Gemfile:
optional:
':test':
- gem: 'webmock'
spec/spec_helper.rb:
spec_overrides:
- require 'spec_helper_local'
Loading

0 comments on commit c01d949

Please sign in to comment.