jenkins-bot has submitted this change and it was merged.

Change subject: browsertests: bundle install gems in shared dir
......................................................................


browsertests: bundle install gems in shared dir

Save up time when running `bundle install` by using a shared directory
which is common to all jobs running on a slave.

Change-Id: Ia8898820040840b30e58cf07a27ccb4f02b8d1fa
Reference: https://github.com/bundler/bundler/issues/2856
---
M macro.yaml
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/macro.yaml b/macro.yaml
index e0fdabc..c3e81e9 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -102,8 +102,12 @@
         ln -s "$WORKSPACE" "$DOCROOT/$TEST_ID"
         curl --location --include "http://localhost:9413/$TEST_ID/"; |head -n42
 
+        # Shared cache of gems to avoid hitting rubygems all the time
+        # See https://github.com/bundler/bundler/issues/2856
+        export GEM_HOME="$WORKSPACE/../gems"
+
         cd {tests-path}
-            /srv/deployment/integration/slave-scripts/tools/bundler/bundle 
install --path vendor
+            /srv/deployment/integration/slave-scripts/tools/bundler/bundle 
install --path "$GEM_HOME"
             export BROWSER_LABEL="phantomjs"
             export 
MEDIAWIKI_URL="http://localhost:9413/$TEST_ID/index.php?title=";
             export API_URL="http://localhost:9413/$TEST_ID/api.php";

-- 
To view, visit https://gerrit.wikimedia.org/r/112682
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8898820040840b30e58cf07a27ccb4f02b8d1fa
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to