Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

gitlab-ci-runner (30) Versions 3.4.0

Installs/Configures Gitlab CI Runner

Policyfile
Berkshelf
Knife
cookbook 'gitlab-ci-runner', '= 3.4.0', :supermarket
cookbook 'gitlab-ci-runner', '= 3.4.0'
knife supermarket install gitlab-ci-runner
knife supermarket download gitlab-ci-runner
README
Dependencies
Changelog
Quality 33%

Gitlab CI Runner

Description

Install and configure gitlab-ci-runner. Learn more at https://docs.gitlab.com/runner.

Change Log

Requirements

Cookbooks

  • None

Gems

  • toml-rb

Platforms

The following platforms are supported and tested with Test Kitchen:

  • RHEL/CentOS 7+
  • Debian 8+

Resources

The following resources are provided:

  • [gitlab_ci_runner_global_config](documentation/gitlab_ci_runner_global_config.md)
  • [gitlab_ci_runner_package](documentation/gitlab_ci_runner_package.md)
  • [gitlab_ci_runner_service](documentation/gitlab_ci_runner_service.md)
  • [gitlab_ci_runner_runner](documentation/gitlab_ci_runner_runner.md)

Testing

This cookbook is tested through the installation of the full gitlab platform in docker hosts using kitchen-dokken.

  • kitchen-gitlab-gitlab-ce-kitchen: Complete instance of gitlab-ce
  • kitchen-gitlab-ci-runner-os: Installation and registration of gitlab-ci-runner for the relevant operating system.

For more information, see [kitchen.yml](kitchen.yml) and [test](test) directory.

Contributing

Please read carefully [CONTRIBUTING.md](CONTRIBUTING.md) before making a merge request.

License and Author

Copyright (c) 2015-2017 Sam4Mobile, 2017-2018 Make.org, 2019 Samuel Bernard

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog

3.4.0

  • fix: update yum/dnf gpg key urls

3.3.0

  • fix: resource properties lost when set to false-
  • chore: refactor testing
  • fix: global_config resource only load config once

3.2.0

  • fix: update yum gpg key url

3.1.0

  • fix: runner server option passing nil values
    • runner resource would pass nil values to server registration/update when defaults are used

3.0.0

Minor breaking changes, please see [UPGRADING.md](./UPGRADING.md).

  • chore: kitchen test with chef 16
  • feat: declare service actions in loop
  • chore: library refactoring
  • feat: global_config run unified_mode/current_value
    • Run global_config in chef unified_mode and add load_current_value support.
  • feat: runner unified_mode/load_current_value
    • Run runner in chef unfied_mode and add load_current_value support.
    • Library refactorting to support load_current_value.
    • General library refactoring.

2.7.0

  • chore: test with centos stream and ubuntu 20.04
  • fix: raise upon access to a nil config resource
  • feat: add converge_by to global configuration
    • Resource can now be subscribed to/notified from

2.6.0

  • chore: further library and resource refactoring
    • Remove multiple instances of merging for the on-disk and in-flight configuration file contents. Instead ensure that the current state is loaded when creating the config template resource and use that as a source-of-truth going forward.
    • Remove unneeded intermediate variables.
    • Improve variable naming and logging strings.
  • test: update testing for library refactoring

2.5.0

  • chore: refactor runner resource
    • The :register action will no longer update the runner once registered, use the :update action to update a runners configuration
  • chore: improve generated config file formatting

2.4.0

  • fix: convert libraries to use toml-rb gem
    • Issue #19
  • fix: foodcritic is deprecated
  • chore: tidy libraries

2.3.0

  • feat: refactor runner resource to common logic
    • The same logic is used to register as well as update a runner
    • Enhance the stability of the unregister action
  • fix: incorrect api log level
    • HTTP options switch to debug level
  • fix: fixup inspec tests
  • chore: update CI config
    • Remove unneeded selinux recipe
    • Create a test adminsitrative token for the root user on the test gitlab instance

2.2.0

  • fix: ensure option hash uses string keys
  • chore: rename general helpers library
  • test: kitchen test with CentOS 8
  • fix: pass array to package resource instead of loop
  • test: update testing
  • feat: add reload action to service resource
  • doc: major documentation update

2.1.0

  • feat: add api http properties to runner resource
    • Allows override of all net/http attributes
  • feat: add template setting properties to runner and global_config resources
    • Allows override of template file, owner, group, mode and sensitivity.
  • feat: minimum supported Chef version is now 14
  • fix: package resource repo overrides

2.0.0

Main:

  • feat: remodel cookbook as a library
    • Attributes have been removed
    • Recipes have been removed
    • Recipe functionality is now provided by resources
    • The gitlab_ci_runner resource is now gitlab_ci_runner_runner

1.8.0

Main:

  • fix: switch array Array.difference to Array.- for Chef < 15
    • Array.difference was added in Ruby 2.6 which requires Chef 15 or later
  • fix: raise minimum Chef version to 13
  • test: kitchen test with Chef 13

1.7.0

Main:

  • feat: add support for session_server options
  • feat: rewrite to use api to manage runners
    • Configuration file is now generated by acculumated template so manual modifications will be overwritten.
    • Registration options have been moved from the options has to resource properties. The resource will attempt to get registrations from options if they have not been specified.
    • :update action added to update a runner without registration.

Misc:

  • doc: add example showing custom_build_dir runner

1.6.0

Main:

  • feat: add support for Fedora 28
  • feat: port resource/provider to custom resource #8
    • Resource is tested as idempotent
  • feat: add global configuration resource #7
    • Create a global configuration resource as it doesn't make sense to add it to the runner resource as multiple runners could overwrite each other and it is impossible to automatically figure out the precedence
  • feat: manual registration string property
    • Due to the differences between the naming of TOML and CLI fields for certain options, provide an ability to manually specify a registration string. Also, prevent these options from causing registration to fail if they are specified in an options hash.

Tests:

  • include .gitlab-ci.yml from test-cookbook
  • replace deprecated require_chef_omnibus
  • runner config mgmt and library spec test
    • Already registered runners will now have their configuration managed by the gitlab-ci-runner resource. Any changes after registration will be propogated to the config.toml file by the resource
    • Create spec tests for library methods
  • chore: add chef license accept to kitchen config
  • extend spec testing for refactor
  • rename kitchen config file (kitchen.yml instead of .kitchen.yml)
  • switch to chefplatform images

Misc:

  • style(rubocop): fix newer offenses
  • feat: remove deprecated use_inline_resources
  • doc: use doc in git message instead of docs
  • chore: set generic maintainer & helpdesk email
  • chore: add supermarket category in .category
  • chore: move toml gem install to package recipe
    • Move the toml gem install resource to the package recipe so it is available even if no runners are initially defined as the global_config resource depends on it
  • chore: update copyright for 2019

Special thanks to Benjamin M. Hughes (bmhughes@bmhughes.co.uk) for
his major contribution to this version.

1.5.0

Main:

  • update repository url and package name to match version > 10
    • set minimal version support to 10+
  • feat: add amazon platform to yum repo configuration

Misc:

  • style: replace updated_by_last_action by converge_by
  • style(rubocop): fix offenses (heredoc and rescue)
  • chore: add foodcritic & rubocop in Gemfile

1.4.0

Main:

  • add Debian support
  • fix #2: gitlab-runner pkg version is configurable
  • fix(debian): set package retries only when non nil
  • fix: conflict with apt cookbook on resource name

Tests:

  • increase max wait time of gitlab to 5 min (better resilience on shared runners)
  • use .gitlab-ci.yml template [20170731]
  • sleep 2s in tests after runner actions (for shared runner)

Misc:

  • set new contributing guide with karma style
  • remove dependency on yum, set chef version to 12.19

1.3.0

Main:

  • Add official support (with tests) for debian 8
  • Fix wait when error is 500 (or anything else)
  • Fix escape tag-list argument
  • Fix escape bool arguments properly
  • Handover maintenance to Make.org, update Copyright

Tests:

  • Stop always executing a converge before a verify
  • Add always_update_cookbooks: true in provisionner config
  • Use latest template for .gitlab-ci.yml [20170405]
  • Set build_pull: download latest test image
  • Use preprovisionned image with chef for gitlab
  • Make tests work on gitlab shared runner: get around the selinux security

Misc:

  • Fix mistake on provider example in README
  • Fix all rubocop and foodcriti offenses
  • Use cookbook_name "macro" everywhere
  • Fix missing/wrong metadata, set chef-version (>= 12.0)

1.2.0

Main:

  • Fix #2: multiple tags are now correctly handled
  • Fix #3: ruby_block resource is always run
  • Fix #6: Make repo URL and gpgkey an attribute
  • Fix #7: Support multiple env strings
  • Add ChefSpec matchers for LWRP

Tests:

  • Switch to kitchen-docker_cli instead of kitchen-docker
  • Clean kitchen.yml, use instance names & add skip_preparation
  • Add tags in gitlab-ci tests
  • Use Continuous Integration with gitlab-ci
  • Can specify retries in package, set 1 in tests

1.1.0

Main:

  • Fix cookbook to work with latest available version of gitlab (8.5) and gitlab-runner (1.0.4)
  • Be completely generic and accept any runner options
    • rename token to registration_token to match runner cli option name

Tests:

  • Change kitchen driver to docker_cli
  • Use official docker image for gitlab
  • Remove useless monkey patching

Misc:

  • Fix all rubocop offenses
  • Add license, refactor README and update it
  • Add default attribute 'runners' with a small documentation

1.0.0

  • Initial version with Centos 7 support

Collaborator Number Metric
            

3.4.0 passed this metric

Contributing File Metric
            

3.4.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Cookstyle Metric
            

3.4.0 failed this metric

Chef/Modernize/ShellOutHelper: Use the built-in `shell_out` helper available in Chef Infra Client 12.11+ instead of calling `Mixlib::ShellOut.new('foo').run_command`. (https://docs.chef.io/workstation/cookstyle/chef_modernize_shellouthelper): gitlab-ci-runner/libraries/helpers.rb: 85

Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations

No Binaries Metric
            

3.4.0 passed this metric

Testing File Metric
            

3.4.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

3.4.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number