4d2d86e0df
It seems the latest 2.2.12 requires rake>13.0 installed and that requirement doesn't work well in current our CI jobs. Let's pin it to the previous version until we resolve the issue. This change also removes the pin for the very old Ruby version. Closes-Bug: #1917457 Change-Id: I62f35dce338ae186a217dd1d0a141d3a737243a0
30 lines
1.4 KiB
YAML
30 lines
1.4 KiB
YAML
- hosts: all
|
|
tasks:
|
|
- name: install ruby bundler and run it
|
|
shell:
|
|
cmd: |
|
|
if [ "{{ puppet_gem_version }}" != "latest" ]; then
|
|
export PUPPET_GEM_VERSION='~> {{ puppet_gem_version }}'
|
|
fi
|
|
# TODO(tobias-urdin): Remove when we dont pin rspec-puppet
|
|
export RSPEC_PUPPET_VERSION='{{ rspec_puppet_version }}'
|
|
# NOTE(aschultz): rspec-puppet 2.4+ has strict variables enabled
|
|
# which causes test failures. The problem is that the puppet modules
|
|
# have never worked with strict_variables = true due to backwards
|
|
# compatibility & import ordering. Since this has not been true,
|
|
# lets disable it in the unit testing for now. Perhaps some day
|
|
# we will be able to turn this back to true.
|
|
export STRICT_VARIABLES=no
|
|
mkdir .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
export GEM_BIN_DIR=$GEM_HOME/bin
|
|
ruby <<EOF
|
|
cmd = 'gem install bundler --no-document --verbose --no-user-install --bindir=${GEM_BIN_DIR}'
|
|
cmd += ' -v 2.2.11'
|
|
system(cmd)
|
|
EOF
|
|
$GEM_BIN_DIR/bundle install --retry 3
|
|
$GEM_BIN_DIR/bundle exec rake spec SPEC_OPTS='--format documentation'
|
|
chdir: '{{ ansible_user_dir }}/workspace'
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|