From f9050dc5433dc7497e7287b2b0490ba04234644b Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 6 Mar 2020 00:18:42 +0900 Subject: [PATCH] Set --no-user-install in gem install Since --user-install was enabled by default in gem[1], we need to set --no-user-install to make "gem install" refer GEM_HOME. Closes-Bug: #1866176 [1] https://github.com/rubygems/rubygems/pull/2847 Change-Id: Id640ec2cb1012e99826cb990fb4995945183521d (cherry picked from commit 3b266e9a36343b5e26866beeb1a129ab6421ac1a) --- playbooks/prepare-node-integration.yaml | 2 +- playbooks/run-beaker-tests.yaml | 10 +++++----- playbooks/run-lint-tests.yaml | 12 ++++++------ playbooks/run-syntax-tests.yaml | 2 +- playbooks/run-unit-tests.yaml | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/playbooks/prepare-node-integration.yaml b/playbooks/prepare-node-integration.yaml index 6ad292b29..c4116bcdd 100644 --- a/playbooks/prepare-node-integration.yaml +++ b/playbooks/prepare-node-integration.yaml @@ -36,7 +36,7 @@ shell: cmd: | ruby <&1 + gem install rake -n ./.bundled_gems/ --no-user-instal + gem install beaker-rspec --no-user-install + gem install puppetlabs_spec_helper --no-user-install + ./.bundled_gems/rake acceptance 2>&1 --no-user-install fi chdir: '{{ ansible_user_dir }}/workspace' executable: /bin/bash diff --git a/playbooks/run-lint-tests.yaml b/playbooks/run-lint-tests.yaml index 05799ac74..9befbea33 100644 --- a/playbooks/run-lint-tests.yaml +++ b/playbooks/run-lint-tests.yaml @@ -21,7 +21,7 @@ export GEM_HOME=`pwd`/.bundled_gems if [ -f Gemfile ]; then ruby <&1 fi else - gem install rake -n ./.bundled_gems/ --no-ri --no-rdoc - gem install puppet-lint -n ./.bundled_gems/ --no-ri --no-rdoc - gem install metadata-json-lint -n ./.bundled_gems/ --no-ri --no-rdoc - gem install puppetlabs_spec_helper -n ./.bundled_gems/ --no-ri --no-rdoc - gem install puppet -n ./.bundled_gems/ --no-ri --no-rdoc + gem install rake -n ./.bundled_gems/ --no-ri --no-rdoc --no-user-install + gem install puppet-lint -n ./.bundled_gems/ --no-ri --no-rdoc --no-user-install + gem install metadata-json-lint -n ./.bundled_gems/ --no-ri --no-rdoc --no-user-install + gem install puppetlabs_spec_helper -n ./.bundled_gems/ --no-ri --no-rdoc --no-user-install + gem install puppet -n ./.bundled_gems/ --no-ri --no-rdoc --no-user-install ./.bundled_gems/rake lint 2>&1 if [ -f metadata.json ]; then ./.bundled_gems/metadata-json-lint diff --git a/playbooks/run-syntax-tests.yaml b/playbooks/run-syntax-tests.yaml index d9c5a79b7..1037ae37b 100644 --- a/playbooks/run-syntax-tests.yaml +++ b/playbooks/run-syntax-tests.yaml @@ -6,7 +6,7 @@ mkdir .bundled_gems export GEM_HOME=`pwd`/.bundled_gems ruby <