Install & test Ruby SDK, then use that version for other tests.
authorBrett Smith <brett@curoverse.com>
Thu, 4 Sep 2014 20:13:31 +0000 (16:13 -0400)
committerBrett Smith <brett@curoverse.com>
Fri, 5 Sep 2014 15:36:00 +0000 (11:36 -0400)
This commit gives our Ruby SDK the same treatment as other parts of
our build process: we build and install it early, then test it.  We
use that built version to run other tests, to make sure all the
components are synced up throughout the run.

This required turning off `bundle install --deployment`, because
Bundler will not use locally installed Gems in that mode.  This does
make our build process a little less like what we use in production,
but the benefits of consistent testing and tightening the build
loop (you can update a Gem and dependent Gemfiles in one push) seem
worth that cost.

Refs #3720.

jenkins/run-tests.sh

index b79adfb8689e3258ec8603bd4807e5a3e7380ac6..4f4839adc595ccd5c1546ef2649a88244437ea73 100755 (executable)
@@ -52,6 +52,7 @@ cli_test=
 workbench_test=
 apiserver_test=
 python_sdk_test=
+ruby_sdk_test=
 fuse_test=
 leave_temp=
 skip_install=
@@ -188,7 +189,7 @@ clear_temp() {
 
 test_docs() {
     cd "$WORKSPACE/doc"
-    bundle install --deployment
+    bundle install --no-deployment
     rm -rf .site
     # Make sure python-epydoc is installed or the next line won't do much good!
     ARVADOS_API_HOST=qr1hi.arvadosapi.com
@@ -203,9 +204,39 @@ test_doclinkchecker() {
 }
 do_test doclinkchecker
 
+test_ruby_sdk() {
+    cd "$WORKSPACE/sdk/ruby" \
+        && bundle install --no-deployment \
+        && bundle exec rake test
+}
+do_test ruby_sdk
+
+install_ruby_sdk() {
+    cd "$WORKSPACE/sdk/ruby" \
+        && gem build arvados.gemspec \
+        && gem install arvados-*.gem
+}
+do_install ruby_sdk
+
+install_cli() {
+    cd "$WORKSPACE/sdk/cli" \
+        && gem build arvados-cli.gemspec \
+        && gem install arvados-cli-*.gem
+}
+do_install cli
+
+test_cli() {
+    title "Starting SDK CLI tests"
+    cd "$WORKSPACE/sdk/cli" \
+        && bundle install --no-deployment \
+        && mkdir -p /tmp/keep \
+        && KEEP_LOCAL_STORE=/tmp/keep bundle exec rake test $cli_test
+}
+do_test cli
+
 install_apiserver() {
     cd "$WORKSPACE/services/api"
-    bundle install --deployment
+    bundle install --no-deployment
 
     rm -f config/environments/test.rb
     cp config/environments/test.rb.example config/environments/test.rb
@@ -249,12 +280,6 @@ test_apiserver() {
 }
 do_test apiserver
 
-install_cli() {
-    cd "$WORKSPACE/sdk/cli"
-    bundle install --deployment
-}
-do_install cli
-
 declare -a gostuff
 gostuff=(
     services/keepstore
@@ -320,20 +345,11 @@ done
 
 test_workbench() {
     cd "$WORKSPACE/apps/workbench" \
-        && bundle install --deployment \
+        && bundle install --no-deployment \
         && bundle exec rake test $workbench_test
 }
 do_test workbench
 
-test_cli() {
-    title "Starting SDK CLI tests"
-    cd "$WORKSPACE/sdk/cli" \
-        && bundle install --deployment \
-        && mkdir -p /tmp/keep \
-        && KEEP_LOCAL_STORE=/tmp/keep bundle exec rake test $cli_test
-}
-do_test cli
-
 clear_temp
 
 for x in "${successes[@]}"