4 read -rd "\000" helpmessage <<EOF
5 $(basename $0): Build Arvados packages and (optionally) upload them.
8 WORKSPACE=/path/to/arvados $(basename $0) [options]
13 Upload packages (default: false)
15 Scp user for apt server (only required when --upload is specified)
17 Apt server hostname (only required when --upload is specified)
18 --build-bundle-packages (default: false)
19 Build api server and workbench packages with vendor/bundle included
21 Output debug information (default: false)
23 WORKSPACE=path Path to the Arvados source tree to build packages from
32 BUILD_BUNDLE_PACKAGES=0
39 echo >&2 "$helpmessage"
55 --build-bundle-packages)
56 BUILD_BUNDLE_PACKAGES=1
59 echo >&2 "$0: Unrecognized option: '$arg'. Try: $0 --help"
66 if [[ "$UPLOAD" != '0' && ("$APTUSER" == '' || "$APTSERVER" == '') ]]; then
67 echo >&2 "$helpmessage"
69 echo >&2 "Error: please specify --scp-user and --apt-server if --upload is set"
75 if ! [[ -n "$WORKSPACE" ]]; then
76 echo >&2 "$helpmessage"
78 echo >&2 "Error: WORKSPACE environment variable not set"
84 fpm --version >/dev/null 2>&1
86 if [[ "$?" != 0 ]]; then
87 echo >&2 "$helpmessage"
89 echo >&2 "Error: fpm not found"
94 if ! easy_install3 --version >/dev/null; then
98 Error: easy_install3 (from python3-setuptools) not found
104 RUN_BUILD_PACKAGES_PATH="`dirname \"$0\"`"
105 RUN_BUILD_PACKAGES_PATH="`( cd \"$RUN_BUILD_PACKAGES_PATH\" && pwd )`" # absolutized and normalized
106 if [ -z "$RUN_BUILD_PACKAGES_PATH" ] ; then
107 # error; for some reason, the path is not accessible
108 # to the script (e.g. permissions re-evaled after suid)
112 if [[ "$DEBUG" != 0 ]]; then
113 echo "$0 is running from $RUN_BUILD_PACKAGES_PATH"
114 echo "Workspace is $WORKSPACE"
118 # Generates a version number from the git log for the current working
119 # directory, and writes it to stdout.
120 local git_ts git_hash
121 declare $(TZ=UTC git log -n1 --first-parent --max-count=1 \
122 --format=format:"git_ts=%ct git_hash=%h" .)
123 echo "0.1.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).$git_hash"
126 timestamp_from_git() {
127 # Generates a version number from the git log for the current working
128 # directory, and writes it to stdout.
129 local git_ts git_hash
130 declare $(TZ=UTC git log -n1 --first-parent --max-count=1 \
131 --format=format:"git_ts=%ct git_hash=%h" .)
135 handle_python_package () {
136 # This function assumes the current working directory is the python package directory
137 if [[ "$UPLOAD" != 0 ]]; then
138 # Make sure only to use sdist - that's the only format pip can deal with (sigh)
139 if [[ "$DEBUG" != 0 ]]; then
140 python setup.py sdist upload
142 python setup.py -q sdist upload
145 # Make sure only to use sdist - that's the only format pip can deal with (sigh)
146 if [[ "$DEBUG" != 0 ]]; then
147 python setup.py sdist
149 python setup.py -q sdist
154 # Build debs for everything
155 build_and_scp_deb () {
156 # The package source. Depending on the source type, this can be a
157 # path, or the name of the package in an upstream repository (e.g.,
161 # The name of the package to build. Defaults to $PACKAGE.
162 PACKAGE_NAME=${1:-$PACKAGE}
164 # Optional: the vendor of the package. Should be "Curoverse, Inc." for
165 # packages of our own software. Passed to fpm --vendor.
168 # The type of source package. Passed to fpm -s. Default "python".
169 PACKAGE_TYPE=${1:-python}
171 # Optional: the package version number. Passed to fpm -v.
175 # fpm does not actually support a python3 package type. Instead we recognize
176 # it as a convenience shortcut to add several necessary arguments to
177 # fpm's command line later, after we're done handling positional arguments.
178 if [ "python3" = "$PACKAGE_TYPE" ]; then
180 set -- "$@" --python-bin python3 --python-easyinstall easy_install3 \
181 --python-package-name-prefix python3 --depends python3
184 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "-s" "$PACKAGE_TYPE" "-t" "deb" "-x" "usr/local/lib/python2.7/dist-packages/tests")
186 if [[ "$PACKAGE_NAME" != "$PACKAGE" ]]; then
187 COMMAND_ARR+=('-n' "$PACKAGE_NAME")
190 if [[ "$VENDOR" != "" ]]; then
191 COMMAND_ARR+=('--vendor' "$VENDOR")
194 if [[ "$VERSION" != "" ]]; then
195 COMMAND_ARR+=('-v' "$VERSION")
198 # Append remaining function arguments directly to fpm's command line.
203 COMMAND_ARR+=("$PACKAGE")
205 if [[ "$DEBUG" != 0 ]]; then
207 echo "${COMMAND_ARR[@]}"
211 FPM_RESULTS=$("${COMMAND_ARR[@]}")
214 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
217 # verify build results and scp debs, if needed
218 verify_and_scp_deb () {
224 if [[ $FPM_RESULTS =~ ([A-Za-z0-9_\-.]*\.deb) ]]; then
225 FPM_PACKAGE_NAME=${BASH_REMATCH[1]}
228 if [[ "$FPM_PACKAGE_NAME" == "" ]]; then
230 echo "Error: $PACKAGE: Unable to figure out package name from fpm results:"
235 if [[ ! $FPM_RESULTS =~ "File already exists" ]]; then
236 if [[ "$FPM_EXIT_CODE" != "0" ]]; then
237 echo "Error building debian package for $1:\n $FPM_RESULTS"
239 if [[ "$UPLOAD" != 0 ]]; then
240 scp -P2222 $FPM_PACKAGE_NAME $APTUSER@$APTSERVER:tmp/
245 echo "Debian package $FPM_PACKAGE_NAME exists, not rebuilding"
250 if [[ -f /etc/profile.d/rvm.sh ]]; then
251 source /etc/profile.d/rvm.sh
254 # Make all files world-readable -- jenkins runs with umask 027, and has checked
255 # out our git tree here
256 chmod o+r "$WORKSPACE" -R
258 # More cleanup - make sure all executables that we'll package are 755
259 find -type d -name 'bin' |xargs -I {} find {} -type f |xargs -I {} chmod 755 {}
261 # Now fix our umask to something better suited to building and publishing
265 if [[ "$DEBUG" != 0 ]]; then
266 echo "umask is" `umask`
270 if [[ "$DEBUG" != 0 ]]; then
271 echo -e "\nPerl packages\n"
274 if [[ "$DEBUG" != 0 ]]; then
280 cd "$WORKSPACE/sdk/perl"
282 if [[ -e Makefile ]]; then
283 make realclean >"$PERL_OUT"
285 find -maxdepth 1 \( -name 'MANIFEST*' -or -name 'libarvados-perl_*.deb' \) \
289 perl Makefile.PL >"$PERL_OUT" && \
290 make install PREFIX=install INSTALLDIRS=perl >"$PERL_OUT" && \
291 build_and_scp_deb install/=/usr libarvados-perl "Curoverse, Inc." dir \
292 "$(version_from_git)"
295 if [[ "$DEBUG" != 0 ]]; then
301 if type rvm-exec >/dev/null 2>&1; then
302 FPM_GEM_PREFIX=$(rvm-exec system gem environment gemdir)
304 FPM_GEM_PREFIX=$(gem environment gemdir)
309 # clean up old packages
310 find -maxdepth 1 \( -name 'arvados-*.gem' -or -name 'rubygem-arvados_*.deb' \) \
313 if [[ "$DEBUG" != 0 ]]; then
314 gem build arvados.gemspec
316 # -q appears to be broken in gem version 2.2.2
317 gem build arvados.gemspec -q >/dev/null 2>&1
320 if [[ "$UPLOAD" != 0 ]]; then
322 gem push arvados-*gem
325 build_and_scp_deb arvados-*.gem "" "Curoverse, Inc." gem "" \
326 --prefix "$FPM_GEM_PREFIX"
328 # Build arvados-cli GEM
332 rm -f arvados-cli*gem
334 if [[ "$DEBUG" != 0 ]]; then
335 gem build arvados-cli.gemspec
337 # -q appears to be broken in gem version 2.2.2
338 gem build arvados-cli.gemspec -q >/dev/null
341 if [[ "$UPLOAD" != 0 ]]; then
343 gem push arvados-cli*gem
347 if [[ "$DEBUG" != 0 ]]; then
349 echo "Python packages"
356 handle_python_package
358 cd ../../services/fuse
359 handle_python_package
361 cd ../../services/nodemanager
362 handle_python_package
364 if [[ ! -d "$WORKSPACE/debs" ]]; then
365 mkdir -p $WORKSPACE/debs
369 # We use $WORKSPACE/src-build-dir as the clean directory from which to build the src package
370 if [[ ! -d "$WORKSPACE/src-build-dir" ]]; then
371 mkdir "$WORKSPACE/src-build-dir"
373 if [[ "$DEBUG" != 0 ]]; then
374 git clone https://github.com/curoverse/arvados.git src-build-dir
376 git clone -q https://github.com/curoverse/arvados.git src-build-dir
380 cd "$WORKSPACE/src-build-dir"
381 # just in case, check out master
382 if [[ "$DEBUG" != 0 ]]; then
385 # go into detached-head state
386 git checkout `git log --format=format:%h -n1 .`
388 git checkout -q master
390 # go into detached-head state
391 git checkout -q `git log --format=format:%h -n1 .`
394 git log --format=format:%H -n1 . > git-commit.version
396 # Build arvados src deb package
398 PKG_VERSION=$(version_from_git)
400 build_and_scp_deb $WORKSPACE/src-build-dir/=/usr/local/arvados/src arvados-src 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--exclude=usr/local/arvados/src/.git" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=The Arvados source code" "--architecture=all"
402 # clean up, check out master and step away from detached-head state
403 cd "$WORKSPACE/src-build-dir"
404 if [[ "$DEBUG" != 0 ]]; then
407 git checkout -q master
411 export GOPATH=$(mktemp -d)
412 mkdir -p "$GOPATH/src/git.curoverse.com"
413 ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git"
416 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/keepstore"
417 PKG_VERSION=$(version_from_git)
418 go get "git.curoverse.com/arvados.git/services/keepstore"
420 build_and_scp_deb $GOPATH/bin/keepstore=/usr/bin/keepstore keepstore 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=Keepstore is the Keep storage daemon, accessible to clients on the LAN"
423 cd "$GOPATH/src/git.curoverse.com/arvados.git/sdk/go"
424 GO_SDK_VERSION=$(version_from_git)
425 GO_SDK_TIMESTAMP=$(timestamp_from_git)
428 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/keepproxy"
429 KEEPPROXY_VERSION=$(version_from_git)
430 KEEPPROXY_TIMESTAMP=$(timestamp_from_git)
432 if [[ "$GO_SDK_TIMESTAMP" -gt "$KEEPPROXY_TIMESTAMP" ]]; then
433 PKG_VERSION=$GO_SDK_VERSION
435 PKG_VERSION=$KEEPPROXY_VERSION
438 go get "git.curoverse.com/arvados.git/services/keepproxy"
440 build_and_scp_deb $GOPATH/bin/keepproxy=/usr/bin/keepproxy keepproxy 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=Keepproxy makes a Keep cluster accessible to clients that are not on the LAN"
443 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/datamanager"
444 DATAMANAGER_VERSION=$(version_from_git)
445 DATAMANAGER_TIMESTAMP=$(timestamp_from_git)
447 if [[ "$GO_SDK_TIMESTAMP" -gt "$DATAMANAGER_TIMESTAMP" ]]; then
448 PKG_VERSION=$GO_SDK_VERSION
450 PKG_VERSION=$DATAMANAGER_VERSION
453 go get "git.curoverse.com/arvados.git/services/datamanager"
455 build_and_scp_deb $GOPATH/bin/datamanager=/usr/bin/arvados-data-manager arvados-data-manager 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=Datamanager ensures block replication levels, reports on disk usage and determines which blocks should be deleted when space is needed."
458 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/arv-git-httpd"
459 ARVGITHTTPD_VERSION=$(version_from_git)
460 ARVGITHTTPD_TIMESTAMP=$(timestamp_from_git)
462 if [[ "$GO_SDK_TIMESTAMP" -gt "$ARVGITHTTPD_TIMESTAMP" ]]; then
463 PKG_VERSION=$GO_SDK_VERSION
465 PKG_VERSION=$ARVGITHTTPD_VERSION
468 go get "git.curoverse.com/arvados.git/services/arv-git-httpd"
470 build_and_scp_deb $GOPATH/bin/arv-git-httpd=/usr/bin/arvados-git-httpd arvados-git-httpd 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=Provides authenticated http access to Arvados-hosted git repositories."
473 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/crunchstat"
474 PKG_VERSION=$(version_from_git)
475 go get "git.curoverse.com/arvados.git/services/crunchstat"
477 build_and_scp_deb $GOPATH/bin/crunchstat=/usr/bin/crunchstat crunchstat 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=Crunchstat gathers cpu/memory/network statistics of running Crunch jobs"
480 # Please resist the temptation to add --no-python-fix-name to the fpm call here
481 # (which would remove the python- prefix from the package name), because this
482 # package is a dependency of arvados-fuse, and fpm can not omit the python-
483 # prefix from only one of the dependencies of a package... Maybe I could
484 # whip up a patch and send it upstream, but that will be for another day. Ward,
487 # Python version numbering is obscure. Strip dashes and replace them with dots
488 # to match our other version numbers. Cf. commit 4afcb8c, compliance with PEP-440.
489 build_and_scp_deb $WORKSPACE/sdk/python python-arvados-python-client 'Curoverse, Inc.' 'python' "$(awk '($1 == "Version:"){ gsub(/-/,".",$2); print $2 }' $WORKSPACE/sdk/python/arvados_python_client.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Arvados Python SDK"
492 # Please see comment about --no-python-fix-name above; we stay consistent and do
493 # not omit the python- prefix first.
495 # Python version numbering is obscure. Strip dashes and replace them with dots
496 # to match our other version numbers. Cf. commit 4afcb8c, compliance with PEP-440.
497 build_and_scp_deb $WORKSPACE/services/fuse python-arvados-fuse 'Curoverse, Inc.' 'python' "$(awk '($1 == "Version:"){ gsub(/-/,".",$2); print $2 }' $WORKSPACE/services/fuse/arvados_fuse.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Keep FUSE driver"
501 # Python version numbering is obscure. Strip dashes and replace them with dots
502 # to match our other version numbers. Cf. commit 4afcb8c, compliance with PEP-440.
503 build_and_scp_deb $WORKSPACE/services/nodemanager arvados-node-manager 'Curoverse, Inc.' 'python' "$(awk '($1 == "Version:"){ gsub(/-/,".",$2); print $2}' $WORKSPACE/services/nodemanager/arvados_node_manager.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Arvados node manager"
505 # The Docker image cleaner
507 build_and_scp_deb $WORKSPACE/services/dockercleaner arvados-docker-cleaner 'Curoverse, Inc.' 'python3' "$(awk '($1 == "Version:"){print $2}' $WORKSPACE/services/dockercleaner/arvados_docker_cleaner.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Arvados Docker image cleaner"
510 for deppkg in python-gflags pyvcf google-api-python-client oauth2client \
511 pyasn1 pyasn1-modules rsa uritemplate httplib2 ws4py virtualenv \
512 pykka apache-libcloud requests six pyexecjs jsonschema ciso8601 \
513 pycrypto backports.ssl_match_hostname; do
514 build_and_scp_deb "$deppkg"
517 # Python 3 dependencies
518 for deppkg in docker-py six requests; do
519 # The empty string is the vendor argument: these aren't Curoverse software.
520 build_and_scp_deb "$deppkg" "python3-$deppkg" "" python3
523 # Build the API server package
525 cd "$WORKSPACE/services/api"
527 API_VERSION=$(version_from_git)
528 PACKAGE_NAME=arvados-api-server
530 if [[ ! -d "$WORKSPACE/services/api/tmp" ]]; then
531 mkdir $WORKSPACE/services/api/tmp
534 BUNDLE_OUTPUT=`bundle install --path vendor/bundle`
536 if [[ "$DEBUG" != 0 ]]; then
540 /usr/bin/git rev-parse HEAD > git-commit.version
544 # Annoyingly, we require a database.yml file for rake assets:precompile to work. So for now,
545 # we do that in the upgrade script.
546 # TODO: add bogus database.yml file so we can precompile the assets and put them in the
547 # package. Then remove that database.yml file again. It has to be a valid file though.
548 #RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile
550 # This is the complete package with vendor/bundle included.
551 # It's big, so we do not build it by default.
552 if [[ "$BUILD_BUNDLE_PACKAGES" != 0 ]]; then
553 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "--vendor='Curoverse, Inc.'" "--url='https://arvados.org'" "--description='Arvados API server - Arvados is a free and open source platform for big data science.'" "--license='GNU Affero General Public License, version 3.0'" "-s" "dir" "-t" "deb" "-n" "${PACKAGE_NAME}-with-bundle" "-v" "$API_VERSION" "-x" "var/www/arvados-api/current/tmp" "-x" "var/www/arvados-api/current/log" "-x" "var/www/arvados-api/current/vendor/cache/*" "-x" "var/www/arvados-api/current/coverage" "-x" "var/www/arvados-api/current/Capfile*" "-x" "var/www/arvados-api/current/config/deploy*" "--after-install=$RUN_BUILD_PACKAGES_PATH/arvados-api-server-extras/postinst.sh" "$WORKSPACE/services/api/=/var/www/arvados-api/current" "$RUN_BUILD_PACKAGES_PATH/arvados-api-server-extras/arvados-api-server-upgrade.sh=/usr/local/bin/arvados-api-server-upgrade.sh")
555 if [[ "$DEBUG" != 0 ]]; then
557 echo "${COMMAND_ARR[@]}"
561 FPM_RESULTS=$("${COMMAND_ARR[@]}")
563 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
566 # Build the 'bare' package without vendor/bundle.
567 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "--vendor='Curoverse, Inc.'" "--url='https://arvados.org'" "--description='Arvados API server - Arvados is a free and open source platform for big data science.'" "--license='GNU Affero General Public License, version 3.0'" "-s" "dir" "-t" "deb" "-n" "${PACKAGE_NAME}" "-v" "$API_VERSION" "-x" "var/www/arvados-api/current/tmp" "-x" "var/www/arvados-api/current/log" "-x" "var/www/arvados-api/current/vendor/bundle" "-x" "var/www/arvados-api/current/vendor/cache/*" "-x" "var/www/arvados-api/current/coverage" "-x" "var/www/arvados-api/current/Capfile*" "-x" "var/www/arvados-api/current/config/deploy*" "--after-install=$RUN_BUILD_PACKAGES_PATH/arvados-api-server-extras/postinst.sh" "$WORKSPACE/services/api/=/var/www/arvados-api/current" "$RUN_BUILD_PACKAGES_PATH/arvados-api-server-extras/arvados-api-server-upgrade.sh=/usr/local/bin/arvados-api-server-upgrade.sh")
569 if [[ "$DEBUG" != 0 ]]; then
571 echo "${COMMAND_ARR[@]}"
575 FPM_RESULTS=$("${COMMAND_ARR[@]}")
577 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
579 # API server package build done
581 # Build the workbench server package
583 cd "$WORKSPACE/apps/workbench"
585 WORKBENCH_VERSION=$(version_from_git)
586 PACKAGE_NAME=arvados-workbench
588 if [[ ! -d "$WORKSPACE/apps/workbench/tmp" ]]; then
589 mkdir $WORKSPACE/apps/workbench/tmp
592 BUNDLE_OUTPUT=`bundle install --path vendor/bundle`
594 if [[ "$DEBUG" != 0 ]]; then
598 /usr/bin/git rev-parse HEAD > git-commit.version
600 # clear the tmp directory; the asset generation step will recreate tmp/cache/assets,
601 # and we want that in the package, so it's easier to not exclude the tmp directory
602 # from the package - empty it instead.
603 rm -rf $WORKSPACE/apps/workbench/tmp/*
605 RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile >/dev/null
609 # This is the complete package with vendor/bundle included.
610 # It's big, so we do not build it by default.
611 if [[ "$BUILD_BUNDLE_PACKAGES" != 0 ]]; then
613 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "--vendor='Curoverse, Inc.'" "--url='https://arvados.org'" "--description='Arvados Workbench - Arvados is a free and open source platform for big data science.'" "--license='GNU Affero General Public License, version 3.0'" "-s" "dir" "-t" "deb" "-n" "${PACKAGE_NAME}-with-bundle" "-v" "$WORKBENCH_VERSION" "-x" "var/www/arvados-workbench/current/log" "-x" "var/www/arvados-workbench/current/vendor/cache/*" "-x" "var/www/arvados-workbench/current/coverage" "-x" "var/www/arvados-workbench/current/Capfile*" "-x" "var/www/arvados-workbench/current/config/deploy*" "--after-install=$RUN_BUILD_PACKAGES_PATH/arvados-workbench-extras/postinst.sh" "$WORKSPACE/apps/workbench/=/var/www/arvados-workbench/current" "$RUN_BUILD_PACKAGES_PATH/arvados-workbench-extras/arvados-workbench-upgrade.sh=/usr/local/bin/arvados-workbench-upgrade.sh")
615 if [[ "$DEBUG" != 0 ]]; then
617 echo "${COMMAND_ARR[@]}"
621 FPM_RESULTS=$("${COMMAND_ARR[@]}")
623 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
626 # Build the 'bare' package without vendor/bundle.
628 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "--vendor='Curoverse, Inc.'" "--url='https://arvados.org'" "--description='Arvados Workbench - Arvados is a free and open source platform for big data science.'" "--license='GNU Affero General Public License, version 3.0'" "-s" "dir" "-t" "deb" "-n" "${PACKAGE_NAME}" "-v" "$WORKBENCH_VERSION" "-x" "var/www/arvados-workbench/current/log" "-x" "var/www/arvados-workbench/current/vendor/bundle" "-x" "var/www/arvados-workbench/current/vendor/cache/*" "-x" "var/www/arvados-workbench/current/coverage" "-x" "var/www/arvados-workbench/current/Capfile*" "-x" "var/www/arvados-workbench/current/config/deploy*" "--after-install=$RUN_BUILD_PACKAGES_PATH/arvados-workbench-extras/postinst.sh" "$WORKSPACE/apps/workbench/=/var/www/arvados-workbench/current" "$RUN_BUILD_PACKAGES_PATH/arvados-workbench-extras/arvados-workbench-upgrade.sh=/usr/local/bin/arvados-workbench-upgrade.sh")
630 if [[ "$DEBUG" != 0 ]]; then
632 echo "${COMMAND_ARR[@]}"
636 FPM_RESULTS=$("${COMMAND_ARR[@]}")
638 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
640 # Workbench package build done
642 # Finally, publish the packages, if necessary
643 if [[ "$UPLOAD" != 0 && "$CALL_FREIGHT" != 0 ]]; then
644 ssh -p2222 $APTUSER@$APTSERVER -t "cd tmp && ls -laF *deb && freight add *deb apt/wheezy && freight cache && rm -f *deb"
646 if [[ "$UPLOAD" != 0 ]]; then
647 echo "No new packages generated. No freight run necessary."
651 # clean up temporary GOPATH