Optimization: do not run bundle install for the API server package when
authorWard Vandewege <ward@curoverse.com>
Fri, 28 Aug 2015 15:37:35 +0000 (11:37 -0400)
committerWard Vandewege <ward@curoverse.com>
Fri, 28 Aug 2015 15:38:59 +0000 (11:38 -0400)
we aren't including the vendor directory in the package we're building.

No issue #

jenkins/run-build-packages.sh

index cd8351324b1bc3fa63f953107fafe06e8a67ba68..fbd5fa54f5e27c4ee05bbb4203fc60a137eb4389 100755 (executable)
@@ -584,7 +584,9 @@ if [[ ! -d "$WORKSPACE/services/api/tmp" ]]; then
 fi
 
 
-bundle install --path vendor/bundle >"$STDOUT_IF_DEBUG"
+if [[ "$BUILD_BUNDLE_PACKAGES" != 0 ]]; then
+  bundle install --path vendor/bundle >"$STDOUT_IF_DEBUG"
+fi
 
 /usr/bin/git rev-parse HEAD > git-commit.version
 
@@ -630,6 +632,8 @@ if [[ ! -d "$WORKSPACE/apps/workbench/tmp" ]]; then
   mkdir $WORKSPACE/apps/workbench/tmp
 fi
 
+# We need to bundle to be ready even when we build a package without vendor directory
+# because asset compilation requires it.
 bundle install --path vendor/bundle >"$STDOUT_IF_DEBUG"
 
 /usr/bin/git rev-parse HEAD > git-commit.version