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 1.5.0

Installs/Configures Gitlab CI Runner

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

Gitlab CI Runner

Description

Install and configure runners for gitlab-ci. Use
gitlab-ci-multi-runner as runner type. Learn more on
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner.

Requirements

Cookbooks and gems

Declared in [metadata.rb](metadata.rb) and in [Gemfile](Gemfile).

Platforms

  • RHEL Family 7, tested on Centos
  • Debian 8

Usage

Easy Setup

Add recipe[gitlab-ci-runner] in your run-list to install
gitlab-ci-multi-runner using its repository.

To add runners, use default provider or use
recipe[gitlab-ci-runner::register] and runners attribute. To see a use
case, look at [.kitchen.yml](.kitchen.yml).

Test

This cookbook is fully tested through the installation of the full gitlab
platform in docker hosts. This uses kitchen, docker and some monkey-patching.

If you run kitchen list, you will see 3 suites, Each corresponds to a different
server:

  • kitchen-gitlab-ubuntu-1404: complete instance of gitlab-ce
  • kitchen-gitlab-ci-runner-centos-7: installation of gitlab-ci-multi-runner and configuration of runners on a centos-7
  • kitchen-gitlab-ci-runner-debian-8: same but for debian-8

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

Attributes

Configuration is done by overriding default attributes. All configuration keys
have a default defined in [attributes/default.rb](attributes/default.rb).
Please read it to have a comprehensive view of what and how you can configure
this cookbook behavior.

Recipes

default

Install gitlab-ci-multi-runner by using its repository, enable and start
the service.

repository

Install runner repository.

package

Install gitlab-ci-multi-runner package.

service

Enable and start runner service.

register

Register or Unregister runners based on attribute
['gitlab-ci-runner']['runners']. This is an Array of Hash where each Hash
represent an action on a runner, "register" or "unregister". In a Hash,
description key is the name attribute and represents the name of the runner.
Then each runner option should be listed in a sub-Hash of key options, each
sub-key matching an option name of gitlab-runner cli.

See [.kitchen.yml](.kitchen.yml) for an example.

Resources/Providers

default

Register or Unregister runners. For instance, to register a default runner
to http://gitlab-ci.myinstance:

gitlab_ci_runner 'my runner' do
  options({
    registration_token: '1234567890',
    url: 'http://gitlab-ci.myinstance'
  })
end

The options list with full documentation is available in
[resources/default.rb](resources/default.rb).

Changelog

Available in [CHANGELOG.md](CHANGELOG.md).

Contributing

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

License and Author

Copyright (c) 2015-2017 Sam4Mobile, 2017 Make.org

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

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
            

1.5.0 passed this metric

Contributing File Metric
            

1.5.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

Foodcritic Metric
            

1.5.0 passed this metric

No Binaries Metric
            

1.5.0 passed this metric

Testing File Metric
            

1.5.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
            

1.5.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