Dduvall has uploaded a new change for review.
https://gerrit.wikimedia.org/r/176818
Change subject: Try local gem cache in bundle job
......................................................................
Try local gem cache in bundle job
Don't try to install bundler if it's already installed.
Invoke bundle with the `--local` option first to limit gem queries to
the local cache before attempting to connect to rubygems.org.
Change-Id: I416ff355667e4dcdce225666f21d36c63382919b
---
M jjb/ruby-jobs.yaml
1 file changed, 11 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/integration/config
refs/changes/18/176818/1
diff --git a/jjb/ruby-jobs.yaml b/jjb/ruby-jobs.yaml
index 0fb8c54..19e3490 100644
--- a/jjb/ruby-jobs.yaml
+++ b/jjb/ruby-jobs.yaml
@@ -6,14 +6,20 @@
# See https://github.com/bundler/bundler/issues/2856
export GEM_HOME="$WORKSPACE/../gems/2.0.0"
- # install ruby dependencies
- mkdir -p vendor
- gem2.0 install --env-shebang -i vendor --no-document bundler
-
# Prepare some paths lookup
+ mkdir -p vendor
export GEM_PATH="`pwd`/vendor"
- vendor/bin/bundle install --verbose
+ # Install bundler if it's not installed already
+ if ! gem2.0 which -q bundler &> /dev/null; then
+ gem2.0 install --env-shebang -i vendor --no-document bundler
+ fi
+
+ # Attempt gem installation from local cache first, then remote
+ if ! vendor/bin/bundle install --local --verbose; then
+ vendor/bin/bundle install --verbose
+ fi
+
vendor/bin/bundle exec {command}
- job-template:
--
To view, visit https://gerrit.wikimedia.org/r/176818
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I416ff355667e4dcdce225666f21d36c63382919b
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Dduvall <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits