puppet-openstack-integration/playbooks/run-litmus-tests.yaml
Takashi Kajinami 6225d065c0 Stop using deprecated --without argument
We've seen the following warning in CI jobs.

```
[DEPRECATED] The `--without` flag is deprecated because it relies on
being remembered across bundler invocations, which bundler will no
longer do in future versions. Instead please use `bundle config set
--local without 'system_tests'`, and stop using this flag
```

This updates the usage accordingly.

Change-Id: I9bddeea04ae0469b8074795b08f71ddd4ac6238e
2023-04-06 11:03:44 +09:00

34 lines
1.2 KiB
YAML

- hosts: all
tasks:
- name: Run Litmus
shell:
cmd: |
set -e
function trap_exit_sig() {
{{ ansible_user_dir }}/workspace/puppet-openstack-integration/copy_logs.sh
# NOTE(tobias-urdin): Litmus does not execute spec_clean rake task after a run.
$GEM_BIN_DIR/bundle exec rake spec_clean
}
trap trap_exit_sig EXIT
export CEPH_VERSION={{ ceph }}
if [ "{{ puppet_gem_version }}" != "latest" ]; then
export PUPPET_GEM_VERSION='~> {{ puppet_gem_version }}'
fi
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 config set --local without system_tests
$GEM_BIN_DIR/bundle install --retry 3
export RSPEC_DEBUG=true
$GEM_BIN_DIR/bundle exec rake litmus:acceptance:localhost
chdir: '{{ ansible_user_dir }}/workspace'
executable: /bin/bash
become: yes
environment: '{{ zuul | zuul_legacy_vars }}'