2013-11-21 11:06:42 +00:00
|
|
|
source 'https://rubygems.org'
|
|
|
|
|
2016-08-31 11:30:47 +00:00
|
|
|
require_relative "lib/gitlab/version"
|
|
|
|
|
2021-11-18 07:11:32 +00:00
|
|
|
omnibus_gem_version = Gitlab::Version.new('omnibus')
|
2016-08-31 11:30:47 +00:00
|
|
|
|
2018-03-27 16:07:21 +00:00
|
|
|
# Note that omnibus is from a fork with additional gitlab changes. You can
|
|
|
|
# check what they are with the following comparison link:
|
|
|
|
|
|
|
|
# https://gitlab.com/gitlab-org/omnibus/compare/v5.6.10...gitlab-omnibus-v5.6.10
|
|
|
|
#
|
|
|
|
# * Adds code to generate dependency_licenses.json
|
|
|
|
# * Modifies generation of #{install_dir}/LICENSE to be a combination of all
|
|
|
|
# component licenses.
|
|
|
|
|
Upgrade to Chef 13.6.4 from 12.21.31
* Upgrades from chef 12.21.31 to 13.6.4, including dependent gems
* Updates chefspec to 7.1.1
* Fixes usage of node.default.gitaly in gitaly recipe
* Fixes logging configuration under chef 13
* Updates CHANGELOG
* Multiple rspec fixes
** Changes uses of `old_run_action` to a more compatible call
** More complete Kernel.load mocking
** Globally mocks `#freeze` on helper instances
** Reset the Gitlab singleton in global `before`
** Fixes bad cache interactions in `services_spec`
** Remove pending from Chef 13 dependent example
= Chef 13.6.4
$EDITOR Gemfile # pin Chef to 13.6.4
bundle upgrade chef
git add --patch Gemfile Gemfile.lock
$EDITOR config/software/*.rb # reflect changes in Gemfile.lock
git add config/software
13.6.4 is the most-recent-but-one release in the `stable` series of chef
releases. https://downloads.chef.io/chef/stable
We had tried with the latest `stable` release of chef 13, 13.7.16, but
hit issues with the defaulting of array properties:
https://github.com/chef/chef/issues/6784
https://github.com/chef/chef/issues/6792
Care should be taken to upgrade over 13.7.16 to the next stable release,
though we do have examples that will fail if these bugs are not fixed.
= Chefspec 7.1.1
It's necessary to upgrade to chefspec >= 7 to support chef 13. We take
the opportunity to go to 7.1.1 which is the latest stable version. 7.1
auto-generates matchers, so we are able to remove
`spec/support/matchers.rb` and `package/libraries/matchers.rb`
== Fixes usage of node.default.gitaly in gitaly recipe
Chef 13 no longer auto-generates accessors on the `attributes` Mashes,
and instead expects you to access them using the `#[]=` method.
We had one use in the gitaly recipe, which has been corrected to follow
common style.
= Be more explicit about the run mode for chef-client
The run-mode of the chef-client was not configured explcitly, and
instead relies on `interval` not being specified to mean 'run once and
exit', rather than using the `once` configuration option.
Additionally, when specifying `once` it also makes sense to specify
`client_fork false` as it avoids a needless fork.
= Fixes logging configuration under chef 13
Due to some refactorings in the development of chef 13, it is no longer
possible to have just a logfile and logging formatter configured
*without* an additional STDOUT logger.
This issue has been raised upstream as
https://github.com/chef/chef/issues/6889 in the interim we monkey-patch
the application class to surpess the creation of the STDOUT logger.
= rspec fixups
== Fix uses of `ruby_block('example').old_run_action(:run)`
We were using the (internal to chefspec) `old_run_action` method to test
the behaviour of the wrapped ruby blocks in `ruby_block` resources.
Due to internal refactorings in chefspec 7.1 `old_run_action` is no
longer available to us.
Here we change uses of the `ruby_block('example').old_run_action(:run)`
pattern to the more compatible `ruby_block('example').block.call`.
== More complete Kernel.load mocking
Chef 13 freezes modules as it loads them. This prevents accidental
redefinition of the methods, but was initially clashing with itself as
during a chefspec run the cookbook compiler was attempting to load all
libraries after we had already loaded them in the chef_helper for ease
of mocking.
We extended our existing mocking of Kernel.load to be consistent with
the loads of libraries from cookbooks other than the gitlab one.
== Globally mocks `#freeze` on helper instances
Related to the changes to mocking Kernel.load, once this was implemented
we are bitten by default values in LWRPs being frozen in the attribute
validator. In order to keep on being able to mock all instances of
`PgHelper` and related classes we add a mock of `#freeze` to several
helper classes.
== Reset the Gitlab singleton in global `before`
The Gitlab global object was carrying state from one example group to
another, this was causing subtle issues when running example groups that
mutated the global Gitlab configuration in incompatible ways.
Here we save the empty state of the Gitlab configuration singleton at
the start of the test run, and then reset back to that state in the
global `before`.
== Fixes bad `cached` interaction in `services_spec`
As a knock-on effect of resetting the Gitlab singleton for every
example, we hit problems with how the `services_spec` was making use of
the `cached` rspec helper.
== Remove pending from Chef 13 dependent example
An example that had initially raised awareness of the need for a chef13
upgrade started working. As this was a pending rspec example this made
the tests fail. Here we remove the pending qualifier.
2018-02-14 12:11:15 +00:00
|
|
|
# When updating gem versions:
|
|
|
|
# 1. Edit this file to specify pinning if needed
|
2022-08-03 05:08:17 +00:00
|
|
|
# 2. `bundle update GEM`
|
Upgrade to Chef 13.6.4 from 12.21.31
* Upgrades from chef 12.21.31 to 13.6.4, including dependent gems
* Updates chefspec to 7.1.1
* Fixes usage of node.default.gitaly in gitaly recipe
* Fixes logging configuration under chef 13
* Updates CHANGELOG
* Multiple rspec fixes
** Changes uses of `old_run_action` to a more compatible call
** More complete Kernel.load mocking
** Globally mocks `#freeze` on helper instances
** Reset the Gitlab singleton in global `before`
** Fixes bad cache interactions in `services_spec`
** Remove pending from Chef 13 dependent example
= Chef 13.6.4
$EDITOR Gemfile # pin Chef to 13.6.4
bundle upgrade chef
git add --patch Gemfile Gemfile.lock
$EDITOR config/software/*.rb # reflect changes in Gemfile.lock
git add config/software
13.6.4 is the most-recent-but-one release in the `stable` series of chef
releases. https://downloads.chef.io/chef/stable
We had tried with the latest `stable` release of chef 13, 13.7.16, but
hit issues with the defaulting of array properties:
https://github.com/chef/chef/issues/6784
https://github.com/chef/chef/issues/6792
Care should be taken to upgrade over 13.7.16 to the next stable release,
though we do have examples that will fail if these bugs are not fixed.
= Chefspec 7.1.1
It's necessary to upgrade to chefspec >= 7 to support chef 13. We take
the opportunity to go to 7.1.1 which is the latest stable version. 7.1
auto-generates matchers, so we are able to remove
`spec/support/matchers.rb` and `package/libraries/matchers.rb`
== Fixes usage of node.default.gitaly in gitaly recipe
Chef 13 no longer auto-generates accessors on the `attributes` Mashes,
and instead expects you to access them using the `#[]=` method.
We had one use in the gitaly recipe, which has been corrected to follow
common style.
= Be more explicit about the run mode for chef-client
The run-mode of the chef-client was not configured explcitly, and
instead relies on `interval` not being specified to mean 'run once and
exit', rather than using the `once` configuration option.
Additionally, when specifying `once` it also makes sense to specify
`client_fork false` as it avoids a needless fork.
= Fixes logging configuration under chef 13
Due to some refactorings in the development of chef 13, it is no longer
possible to have just a logfile and logging formatter configured
*without* an additional STDOUT logger.
This issue has been raised upstream as
https://github.com/chef/chef/issues/6889 in the interim we monkey-patch
the application class to surpess the creation of the STDOUT logger.
= rspec fixups
== Fix uses of `ruby_block('example').old_run_action(:run)`
We were using the (internal to chefspec) `old_run_action` method to test
the behaviour of the wrapped ruby blocks in `ruby_block` resources.
Due to internal refactorings in chefspec 7.1 `old_run_action` is no
longer available to us.
Here we change uses of the `ruby_block('example').old_run_action(:run)`
pattern to the more compatible `ruby_block('example').block.call`.
== More complete Kernel.load mocking
Chef 13 freezes modules as it loads them. This prevents accidental
redefinition of the methods, but was initially clashing with itself as
during a chefspec run the cookbook compiler was attempting to load all
libraries after we had already loaded them in the chef_helper for ease
of mocking.
We extended our existing mocking of Kernel.load to be consistent with
the loads of libraries from cookbooks other than the gitlab one.
== Globally mocks `#freeze` on helper instances
Related to the changes to mocking Kernel.load, once this was implemented
we are bitten by default values in LWRPs being frozen in the attribute
validator. In order to keep on being able to mock all instances of
`PgHelper` and related classes we add a mock of `#freeze` to several
helper classes.
== Reset the Gitlab singleton in global `before`
The Gitlab global object was carrying state from one example group to
another, this was causing subtle issues when running example groups that
mutated the global Gitlab configuration in incompatible ways.
Here we save the empty state of the Gitlab configuration singleton at
the start of the test run, and then reset back to that state in the
global `before`.
== Fixes bad `cached` interaction in `services_spec`
As a knock-on effect of resetting the Gitlab singleton for every
example, we hit problems with how the `services_spec` was making use of
the `cached` rspec helper.
== Remove pending from Chef 13 dependent example
An example that had initially raised awareness of the need for a chef13
upgrade started working. As this was a pending rspec example this made
the tests fail. Here we remove the pending qualifier.
2018-02-14 12:11:15 +00:00
|
|
|
# 3. Inspect and check-in Gemfile.lock
|
|
|
|
# 4. Check that the changes to Gemfile.lock are propogated to the software
|
|
|
|
# definitions in `config/software`. You can find them quickly with:
|
|
|
|
# grep "gem 'install " config/software/*
|
2021-11-18 07:11:32 +00:00
|
|
|
gem 'omnibus', git: omnibus_gem_version.remote(Gitlab::Version::ALTERNATIVE_SOURCE), tag: omnibus_gem_version.print(false)
|
2022-05-06 04:22:45 +00:00
|
|
|
source 'https://packagecloud.io/cinc-project/stable' do
|
2024-01-05 16:37:34 +00:00
|
|
|
gem 'chef', '~> 18.3.0'
|
2022-06-14 05:48:32 +00:00
|
|
|
gem 'chef-cli', '~> 5.6.1'
|
|
|
|
gem 'chef-utils'
|
|
|
|
gem 'mixlib-versioning'
|
2022-05-06 04:22:45 +00:00
|
|
|
end
|
2024-01-05 16:37:34 +00:00
|
|
|
gem 'unf_ext', '~>0.0.9.1'
|
|
|
|
gem 'ohai', '~> 18.0'
|
2018-02-25 13:36:40 +00:00
|
|
|
gem 'rainbow', '~> 2.2' # This is used by gitlab-ctl and the chef formatter
|
2015-04-01 14:38:09 +00:00
|
|
|
gem 'json'
|
2015-05-19 10:51:52 +00:00
|
|
|
gem 'rspec'
|
2016-11-09 18:55:10 +00:00
|
|
|
gem 'rake'
|
2016-12-16 05:51:40 +00:00
|
|
|
gem 'knapsack'
|
2017-02-26 11:46:44 +00:00
|
|
|
gem 'docker-api'
|
2019-05-01 20:53:34 +00:00
|
|
|
gem 'http'
|
2021-02-02 16:01:06 +00:00
|
|
|
gem 'aws-sdk-ec2'
|
|
|
|
gem 'aws-sdk-marketplacecatalog'
|
2021-06-28 06:04:22 +00:00
|
|
|
gem 'gitlab'
|
2021-08-24 04:44:29 +00:00
|
|
|
gem 'yard'
|
2022-08-17 21:14:22 +00:00
|
|
|
gem 'toml-rb'
|
2022-08-30 18:10:48 +00:00
|
|
|
gem 'retriable'
|
2023-09-29 22:08:40 +00:00
|
|
|
gem 'tomlib', '~> 0.6.0'
|
|
|
|
gem 'google-cloud-storage'
|
2018-03-11 00:53:54 +00:00
|
|
|
|
2021-01-07 18:55:43 +00:00
|
|
|
group :packagecloud, optional: true do
|
|
|
|
gem 'package_cloud'
|
2022-08-05 20:31:56 +00:00
|
|
|
gem 'thor', '~> 1.2'
|
2021-01-07 18:55:43 +00:00
|
|
|
end
|
|
|
|
|
2022-08-16 22:45:11 +00:00
|
|
|
group :danger, optional: true do
|
|
|
|
gem 'gitlab-dangerfiles', '~> 3.0', require: false
|
|
|
|
end
|
|
|
|
|
2018-03-11 00:53:54 +00:00
|
|
|
group :rubocop do
|
2022-09-15 14:59:01 +00:00
|
|
|
gem 'gitlab-styles', '~> 9.0', require: false
|
2018-03-11 00:53:54 +00:00
|
|
|
end
|
2016-08-01 20:36:33 +00:00
|
|
|
|
|
|
|
group :test do
|
2022-08-25 23:17:12 +00:00
|
|
|
gem 'debug'
|
2016-08-01 20:36:33 +00:00
|
|
|
gem 'chefspec'
|
2017-02-03 16:21:11 +00:00
|
|
|
gem 'omnibus-ctl', '0.3.6'
|
2017-01-13 16:20:27 +00:00
|
|
|
gem 'fantaskspec'
|
2018-08-31 11:00:50 +00:00
|
|
|
gem 'rspec_junit_formatter'
|
2020-01-02 17:05:21 +00:00
|
|
|
gem 'rspec-parameterized', require: false
|
2022-03-29 09:40:10 +00:00
|
|
|
gem 'simplecov-cobertura'
|
2016-08-01 20:36:33 +00:00
|
|
|
end
|