Commit Graph

40 Commits

Author SHA1 Message Date
Jeremy Stanley 2a8035cecc Pin beaker-hiera<0.2.0
Due to backward-incompatible changes in beaker-hiera 0.2.0, we're
receiving a "uninitialized constant Beaker::DSL::Hiera" NameError
exception trying to use it. Earlier versions were working.

Change-Id: I232b1de6cfbf9c4ffc81e1cc2d6af5dd769ed0b5
2021-02-10 21:47:21 +00:00
Jeremy Stanley 619783f683 Match Puppet version used on servers
OpenDev's legacy Puppet-based configuration management on Ubuntu
Xenial is using the puppet-agent version corresponding to puppet
4.10.12, but our spec helper was still testing with older puppet
3.8. Update here to match what we use in production, for better
fidelity and also to hopefully work around some issues with its
older vendored YAML parser. Also adjust version requirements for
json_pure and nokogiri which were unsettled by the puppet bump.

Change-Id: Ia302186851159ec8c32ebb46e28a15fe9c0f5456
2020-09-18 17:57:17 +00:00
Monty Taylor 1e6387b109 Name gate inventory file gate-hosts
To match the other gate-generated inventory files.

Change-Id: I90104f1b19a980ae1be0263cc4dc59c17125f41e
2020-06-04 16:27:05 -05:00
Monty Taylor fdbf19f0ce Install hosts and group files into service location
We need to pick up the host vars for this to work.

Change-Id: I6ae33919afdbeb5bc1693730d9b24fe4cefc7be5
2020-05-30 06:52:47 -05:00
Jeremy Stanley ee9d290ced Pin puppet-lint-unquoted_string-check to < 2.0.0
The recent 2.0.0 release breaks the
puppet-beaker-rspec-puppet-4-infra job because it wants newer Ruby
than our ubuntu-xenial nodes can provide.

Change-Id: Ibefbf15a9b950783bfd981de41ac62b1352bd2e5
2020-03-25 18:32:57 +00:00
Monty Taylor 9ac8623933 Pin dry-inflector to <0.2
The recent 0.2 release breaks the puppet jobs. Just pin it, it's
a depend for a cloud module we don't care about.

Change-Id: I196acdea6081c7003d11df8f6bf94ab109ccbfbd
2019-10-16 03:04:01 +09:00
Jeremy Stanley 0af997e27f Block minitest 5.12.1
Failing on centos-7 builds:

Gem::InstallError: minitest requires Ruby version ~> 2.3.

https://github.com/seattlerb/minitest/commit/c6352b4 raised the
minimum from Ruby 1.8.7 (unenforced) to 2.3 (enforced) in the
minitest 5.12.1 release, so use 5.12.0 for now.

Change-Id: I56e9693a8d9df6051874ff1ff7096db08bc00dad
2019-10-10 12:51:36 +00:00
Zuul 2c88fceeae Merge "Install puppet with ansible" 2019-05-15 23:09:33 +00:00
Clark Boylan cd8e7bdaa2 Install puppet with ansible
Do this so that we have one way to install puppet (the puppet-install
role) and not multiple ways (including install_puppet.sh). This has
become more important because we need to fix how we install puppet after
upstream deleted the package repos and rather than double account
everything we can do it once.

Change-Id: Iec86a5423b053d4d02f8e0a74fea883d328b1945
2019-05-15 15:30:23 -07:00
Andreas Jaeger 09cfc3d2a6 Block hashdiff 0.3.9 and bundler 2.0
The 0.3.9 hashdiff package breaks beaker-trusty, use 0.3.8 for now.

Cap bundler since version 2.0.1 needs Ruby >= 2.3.0.

Change-Id: I464e29fca3958d058dc5ede93a486fd5c79eb29a
2019-04-23 17:31:34 +02:00
Monty Taylor f0eedbfbab Update for opendev
Change-Id: I3bb5204207ffceb31ee7296d29f08db02d330b4a
2019-04-20 14:12:51 +00:00
OpenDev Sysadmins 1a84060c62 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:26:04 +00:00
Ian Wienand 076eaf467e Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: Iee896482e8c6062c9cbb5887dbab33dc45fedda9
2019-03-24 20:35:43 +00:00
Monty Taylor 54ed0aa7a1
Add roles dir in system-config to roles path
This doesn't exist yet, but is coming in the needed-by patch. Add the
roles dir in system-config to the roles path.

Change-Id: If05f02e856598403d7f94edf5e6e52c5fa69e8e6
Needed-By: https://review.openstack.org/590753
2018-08-10 07:14:28 -05:00
Monty Taylor 2fa5458994
Run ansible base playbook for puppet tests
As we start to do things in the base playbook instead of in puppet, we
need for those things to happen before we run puppet, and before we test
final system state.

Install ansible into a virtualenv, then run the base playbook.

Change-Id: I88808dec9dd4ebdd3fb9081881d2ab69f9eed95e
2018-08-09 10:03:21 -05:00
Paul Belanger c6c2435101
Cap net-telnet < 0.2.0 for ruby 1.9 support
A new release of net-telnet is breaking trusty and centos-7 jobs.

Change-Id: I190f725e2c32c522004fbc9f8970f629d58e27c1
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-07-25 14:07:56 -04:00
Colleen Murphy 42cd1ef1ef Don't be overzealous with passing the environment
Without this change, the gem helper passes the entirely of the user's
environment through beaker's SSH connection. This causes problems with
puppet 4 because all of the ruby and bundler arguments confuse the ruby
interpreter and we see errors like this:

  /var/lib/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/spec_set.rb:91:in `block in materialize'  :   Could not find rake-12.2.1 in any of the sources   (  Bundler::GemNotFound  )

The only important variable is PUPPET_VERSION so just pass that and
nothing else.

Change-Id: I678716890d0c749e755ec0526621d47fee44a4bb
2018-07-09 13:06:05 +02:00
Colleen Murphy 1226b84c9e Use system-config script to install puppet
Previously, we were using the helper methods provided by beaker to
install puppet. When we moved to Xenial but stayed on puppet 3, we
changed the spec helper to install puppet 3 from the Xenial repos. This
duplicates effort that we have already written into install_puppet.sh,
and it doesn't reflect how we really install puppet in production. This
patch changes the install_infra_puppet method to use the install script
in system-config, so that when we make changes to how we install puppet
or what version we install, we only have to do it in one place. This
passes the test environment to the install command so that any
environment variables we set in the job (for example, if we make the
puppet version configurable through environment variables) make it
through. Also add logic to support puppet 4 by adding the new bin path
to the environment and using the appropriate modulepath.

We also need to modernize this helper for Zuulv3. zuul-cloner doesn't
exist on CI nodes any more, but we can rely on Zuul installing the
system-config repo beforehand, so just use that.

Change-Id: Ifa95171e580da96456d76900092ba924da626def
2018-06-15 00:06:25 +02:00
Clark Boylan 6a6f5c85cc Check if we are running under Zuul v3
Update the Zuul conditional check to handle Zuul v3. Zuul v3 no longer
sets a URL or BRANCH env variable so we shouldn't rely on those for
checking if we are running under Zuul. Instead we can check if the
ZUUL_UUID is set which will be present for every job.

Depends-On: I83e7088c36b1b57279bb32e44c9f74730da582cf
Change-Id: Id4f6ae8cc4128083f0db72fb6e2dc81b9968e884
2017-11-29 15:33:02 -08:00
Clark Boylan 77dcdb469e Cap fog-aws < 2.0.0 for ruby 1.9 support
The 2.0.0 release of fog-aws requires ruby 2.0 or greater which is not
available on trusty. Pin to less than 2.0.0 so that we can continue to
function trusty.

Change-Id: Ic2bf772a7e6669ee23b6712222372bc55986f617
2017-11-28 15:09:50 -08:00
Clark Boylan a9b567eadf Cap rake below 12.3.0
New rake version 12.3.0 needs ruby 2.0 or greater which is not available
on our trusty test nodes. Cap to under rake 12.3.0 so that we use older
rake until we can stop using trusty and have more modern ruby.

The test runner script updates the installation path for this helper lib
to point back at itself when running local tests. Unfortunately it was
doing so with a buggy sed that no longer matched the contents of the
Gemfile that needed updating.

Fix this by updating the sed command to properly point to this lib for
local testing. Note this is fixed here because we need both fixes in
together in order to get gate jobs to pass.

Change-Id: Iddbbab9ea5996df4922bf7927deb8f0354378ab7
2017-11-20 10:41:45 -08:00
Paul Belanger b5924b5de0
Cap signet < 0.8.0
The latest release requires ruby 2.0.0, which we don't have on ubuntu
trusty.

Change-Id: Icbc5ad4deb5ed1d2770b55fb4eae1b2b04da7908
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-10-12 14:03:15 -04:00
Clark Boylan 7835c3877c Pin metadata-json-lint and webmock
With release 2.0.0 metadata-json-lint requires ruby 2.0 or greater. Not
all of our platforms come with ruby 2.0 or greater so pin to less than
the 2.0.0 release of metadata-json-lint.

Webmock is in a similar boat with release 3.0.0 dropping support for
ruby < 2.0. Pin this package below 3.0.0 as well.

Change-Id: I698b82c9e4fa2402cbea14a2500402395e6af2ba
2017-09-20 13:38:55 -07:00
Colleen Murphy 2cc8cce5cf Refactor spec helper
The spec helper file has been cargocult-copied from puppetlabs and
puppet-openstack modules, adjusted slightly for Infra's particular
needs. It is hard to read which makes adjusting it hard to do and hard
to review. This refactor moves code into descriptively-named functions,
and condenses the main setup code so that there is only one loop over
the host list, and passes the entire environment into host commands
instead of crafting long bash commands with required environment
variables.

Change-Id: I572a5dc0d9987e8c90a27f300c8b4979e20c43a2
2017-07-09 17:12:37 +02:00
Colleen Murphy 0861447aaa Move spec_helper_acceptance into helper gem
Every puppet module contains the same file that prepares beaker tests.
Currently, when we need to make changes to it, we need to change it in
every puppet module. This is inefficient and causes a huge review
backlog for identical changes. This patch copies the
spec_helper_acceptance.rb file, with minor modifications to keep the
path logic correct, into the common helper gem. The modules already
depend on this gem for common gem dependencies. This way, modules can
simply `require
puppet-openstack_infra_spec_helper/spec_helper_acceptance` in their
tests and not bother keeping the spec_helper_acceptance module locally.

Change-Id: I18ed6cd2f8ee472a66cf580e3e183d14c00e6877
2017-06-25 19:19:54 +02:00
Colleen Murphy 8472caea46 Pin fog-core
The fog-core gem added a dependency on the xmlrpc gem which depends on
ruby 2.3 which is not available on centos7. It seems like they tried to
avoid this issue but weren't successful at it[1], so we'll blacklist the
current version and assume it will be fixed in the next version.

[1] https://github.com/fog/fog-core/issues/206

Change-Id: I968aa64e958cd3e9567fd47981d50b302960783d
2017-04-28 22:03:52 +02:00
Paul Belanger 44a6e5777c Pin nokogiri to fix centos 7 jobs
Change-Id: I9692c6898787703d831e7c7781d6f877e84a7eda
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-12-29 10:32:28 -05:00
Clark Boylan bd9327efe2 Pin fast_gettext to work on CentOS7 ruby
fast_gettext >= 1.2.0 needs ruby >=2.1.0 which is not available on
CentOS 7 so we pin it to < 1.2.0.

Change-Id: I2cc03d0c7f25fdaffa7fdfcf27149a60a7120f1d
2016-12-13 16:49:02 -08:00
Emilien Macchi cc6e6f666b Pin beaker to 2.x releases
Beaker 3.0.0 fails run with current dependencies:
LoadError: cannot load such file -- serverspec

It will be fixed when this PR will be merged and released:
https://github.com/puppetlabs/beaker-rspec/pull/86

Change-Id: I77a35c57b4ff9351b9820d8e36409163da2c0d8f
2016-09-28 14:36:39 +00:00
Jeremy Stanley 4c7c3a271b Revert "Pin puppetlabs_spec_helper ~> 1.1.1"
Oops, I meant to abandon Ide9d7166abba906fd3552fd62983e22f29ba0c4d
as we've worked around it for now in
openstack-infra/project-config via
I96b694dca77c32e9e1cf698ec0d93f8bcae8f082 instead.

This reverts commit 0484aba688.

Change-Id: I67415e1b600f75fcb836a9fed4bcc262a1aaaae0
2016-09-10 13:35:43 +00:00
Jeremy Stanley 0484aba688 Pin puppetlabs_spec_helper ~> 1.1.1
As a workaround for https://github.com/bundler/bundler/issues/4961
temporarily pin puppetlabs_spec_helper ~> 1.1.1 so that we can
resolve a puppet-lint < 2.0 which happens to not tickle the
dependency resolution issues there.

Change-Id: Ide9d7166abba906fd3552fd62983e22f29ba0c4d
2016-09-09 23:19:58 +00:00
Jenkins 788d0b01a6 Merge "Revert "Pin puppetlabs-spec-helper"" 2016-08-26 17:01:50 +00:00
Emilien Macchi 5b61e57d2b Revert "Pin puppetlabs-spec-helper"
They cleared 1.2.0 release to support ruby 2.0.x.

This reverts commit e6a1ce0997.

Change-Id: Iec64103711ea05dddfcde2f07d9b90944352a98a
2016-08-24 01:51:08 +00:00
Jenkins 69c3a0e100 Merge "Pin json_pure gem for ruby1.9 support" 2016-08-23 23:56:30 +00:00
Spencer Krum e6a1ce0997 Pin puppetlabs-spec-helper
We are pinning this because the latest version (1.2.0) requires ruby 2.2
which we don't have. We're largely following suit with what the puppet
openstack modules are doing.

Co-Authored-By: Alex Schultz <aschultz@mirantis.com>
Change-Id: I9153aac8c122e0379cf9e8247cb34c6acc0921fc
2016-08-23 13:57:59 -07:00
K Jonathan Harker 8f3272ec1c Pin json_pure gem for ruby1.9 support
The latest version of json_pure requires ruby ~> 2.0, pin to the last
version that doesn't.

Change-Id: Ide2d519b7a814401162e6e984493510cfa9f2f61
2016-08-03 17:23:14 -07:00
Spencer Krum 2643f056c0 Dependon ~> 3.8 for puppet.
This causes 3.8 or any later 3.x to be installed. It stops short of
4.x

Change-Id: Ie842b25d38541e85cebfc0d11043aec836980173
2016-07-13 18:59:04 -07:00
Spencer Krum ea437014b6 Depend on the puppet gem
Change-Id: I5ed149ea9c3722b4623bfa35b30cfb957887b628
2016-06-21 17:06:24 -07:00
Spencer Krum 8fe0a33f15 Initial commit
This code came from
http://git.openstack.org/cgit/openstack/puppet-openstack_spec_helper/

and was modified for infra's use.

The gems specified in gemspec are current with what infra is currently
using.

Change-Id: I06e47d4af32f30e4504ee67257923a4596725d0f
2016-06-21 16:19:09 -07:00
OpenStack Project Creator 263c91a159 Added .gitreview 2016-06-21 01:50:44 +00:00