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 Package format (default: deb)
25 WORKSPACE=path Path to the Arvados source tree to build packages from
34 BUILD_BUNDLE_PACKAGES=0
42 echo >&2 "$helpmessage"
61 --build-bundle-packages)
62 BUILD_BUNDLE_PACKAGES=1
65 echo >&2 "$0: Unrecognized option: '$arg'. Try: $0 --help"
72 if [[ "$UPLOAD" != '0' && ("$APTUSER" == '' || "$APTSERVER" == '') ]]; then
73 echo >&2 "$helpmessage"
75 echo >&2 "Error: please specify --scp-user and --apt-server if --upload is set"
81 if ! [[ -n "$WORKSPACE" ]]; then
82 echo >&2 "$helpmessage"
84 echo >&2 "Error: WORKSPACE environment variable not set"
90 fpm --version >/dev/null 2>&1
92 if [[ "$?" != 0 ]]; then
93 echo >&2 "$helpmessage"
95 echo >&2 "Error: fpm not found"
100 if ! easy_install3 --version >/dev/null; then
104 Error: easy_install3 (from python3-setuptools) not found
110 RUN_BUILD_PACKAGES_PATH="`dirname \"$0\"`"
111 RUN_BUILD_PACKAGES_PATH="`( cd \"$RUN_BUILD_PACKAGES_PATH\" && pwd )`" # absolutized and normalized
112 if [ -z "$RUN_BUILD_PACKAGES_PATH" ] ; then
113 # error; for some reason, the path is not accessible
114 # to the script (e.g. permissions re-evaled after suid)
118 if [[ "$DEBUG" != 0 ]]; then
119 echo "$0 is running from $RUN_BUILD_PACKAGES_PATH"
120 echo "Workspace is $WORKSPACE"
124 # Generates a version number from the git log for the current working
125 # directory, and writes it to stdout.
126 local git_ts git_hash
127 declare $(TZ=UTC git log -n1 --first-parent --max-count=1 \
128 --format=format:"git_ts=%ct git_hash=%h" .)
129 echo "0.1.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).$git_hash"
132 timestamp_from_git() {
133 # Generates a version number from the git log for the current working
134 # directory, and writes it to stdout.
135 local git_ts git_hash
136 declare $(TZ=UTC git log -n1 --first-parent --max-count=1 \
137 --format=format:"git_ts=%ct git_hash=%h" .)
141 handle_python_package () {
142 # This function assumes the current working directory is the python package directory
143 if [[ "$UPLOAD" != 0 ]]; then
144 # Make sure only to use sdist - that's the only format pip can deal with (sigh)
145 if [[ "$DEBUG" != 0 ]]; then
146 python setup.py sdist upload
148 python setup.py -q sdist upload
151 # Make sure only to use sdist - that's the only format pip can deal with (sigh)
152 if [[ "$DEBUG" != 0 ]]; then
153 python setup.py sdist
155 python setup.py -q sdist
160 # Build debs for everything
161 build_and_scp_deb () {
162 # The package source. Depending on the source type, this can be a
163 # path, or the name of the package in an upstream repository (e.g.,
167 # The name of the package to build. Defaults to $PACKAGE.
168 PACKAGE_NAME=${1:-$PACKAGE}
170 # Optional: the vendor of the package. Should be "Curoverse, Inc." for
171 # packages of our own software. Passed to fpm --vendor.
174 # The type of source package. Passed to fpm -s. Default "python".
175 PACKAGE_TYPE=${1:-python}
177 # Optional: the package version number. Passed to fpm -v.
181 # fpm does not actually support a python3 package type. Instead we recognize
182 # it as a convenience shortcut to add several necessary arguments to
183 # fpm's command line later, after we're done handling positional arguments.
184 if [ "python3" = "$PACKAGE_TYPE" ]; then
186 set -- "$@" --python-bin python3 --python-easyinstall easy_install3 \
187 --python-package-name-prefix python3 --depends python3
190 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "-s" "$PACKAGE_TYPE" "-t" "$FORMAT" "-x" "usr/local/lib/python2.7/dist-packages/tests")
192 if [[ "$PACKAGE_NAME" != "$PACKAGE" ]]; then
193 COMMAND_ARR+=('-n' "$PACKAGE_NAME")
196 if [[ "$VENDOR" != "" ]]; then
197 COMMAND_ARR+=('--vendor' "$VENDOR")
200 if [[ "$VERSION" != "" ]]; then
201 COMMAND_ARR+=('-v' "$VERSION")
204 # Append remaining function arguments directly to fpm's command line.
209 COMMAND_ARR+=("$PACKAGE")
211 if [[ "$DEBUG" != 0 ]]; then
213 echo "${COMMAND_ARR[@]}"
217 FPM_RESULTS=$("${COMMAND_ARR[@]}")
220 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
223 # verify build results and scp debs, if needed
224 verify_and_scp_deb () {
230 if [[ $FPM_RESULTS =~ ([A-Za-z0-9_\-.]*\.)(deb|rpm) ]]; then
231 FPM_PACKAGE_NAME=${BASH_REMATCH[1]}${BASH_REMATCH[2]}
234 if [[ "$FPM_PACKAGE_NAME" == "" ]]; then
236 echo "Error: $PACKAGE: Unable to figure out package name from fpm results:"
241 if [[ ! $FPM_RESULTS =~ "File already exists" ]]; then
242 if [[ "$FPM_EXIT_CODE" != "0" ]]; then
243 echo "Error building debian package for $1:\n $FPM_RESULTS"
245 if [[ "$UPLOAD" != 0 ]]; then
246 scp -P2222 $FPM_PACKAGE_NAME $APTUSER@$APTSERVER:tmp/
251 echo "Package $FPM_PACKAGE_NAME exists, not rebuilding"
256 if [[ -f /etc/profile.d/rvm.sh ]]; then
257 source /etc/profile.d/rvm.sh
260 # Make all files world-readable -- jenkins runs with umask 027, and has checked
261 # out our git tree here
262 chmod o+r "$WORKSPACE" -R
264 # More cleanup - make sure all executables that we'll package are 755
265 find -type d -name 'bin' |xargs -I {} find {} -type f |xargs -I {} chmod 755 {}
267 # Now fix our umask to something better suited to building and publishing
271 if [[ "$DEBUG" != 0 ]]; then
272 echo "umask is" `umask`
276 if [[ "$DEBUG" != 0 ]]; then
277 echo -e "\nPerl packages\n"
280 if [[ "$DEBUG" != 0 ]]; then
286 cd "$WORKSPACE/sdk/perl"
288 if [[ -e Makefile ]]; then
289 make realclean >"$PERL_OUT"
291 find -maxdepth 1 \( -name 'MANIFEST*' -or -name 'libarvados-perl_*.deb' \) \
295 perl Makefile.PL >"$PERL_OUT" && \
296 make install PREFIX=install INSTALLDIRS=perl >"$PERL_OUT" && \
297 build_and_scp_deb install/=/usr libarvados-perl "Curoverse, Inc." dir \
298 "$(version_from_git)"
301 if [[ "$DEBUG" != 0 ]]; then
307 if type rvm-exec >/dev/null 2>&1; then
308 FPM_GEM_PREFIX=$(rvm-exec system gem environment gemdir)
310 FPM_GEM_PREFIX=$(gem environment gemdir)
315 # clean up old packages
316 find -maxdepth 1 \( -name 'arvados-*.gem' -or -name 'rubygem-arvados_*.deb' \) \
319 if [[ "$DEBUG" != 0 ]]; then
320 gem build arvados.gemspec
322 # -q appears to be broken in gem version 2.2.2
323 gem build arvados.gemspec -q >/dev/null 2>&1
326 if [[ "$UPLOAD" != 0 ]]; then
328 gem push arvados-*gem
331 build_and_scp_deb arvados-*.gem "" "Curoverse, Inc." gem "" \
332 --prefix "$FPM_GEM_PREFIX"
334 # Build arvados-cli GEM
338 rm -f arvados-cli*gem
340 if [[ "$DEBUG" != 0 ]]; then
341 gem build arvados-cli.gemspec
343 # -q appears to be broken in gem version 2.2.2
344 gem build arvados-cli.gemspec -q >/dev/null
347 if [[ "$UPLOAD" != 0 ]]; then
349 gem push arvados-cli*gem
353 if [[ "$DEBUG" != 0 ]]; then
355 echo "Python packages"
362 handle_python_package
364 cd ../../services/fuse
365 handle_python_package
367 cd ../../services/nodemanager
368 handle_python_package
370 if [[ ! -d "$WORKSPACE/debs" ]]; then
371 mkdir -p $WORKSPACE/debs
375 # We use $WORKSPACE/src-build-dir as the clean directory from which to build the src package
376 if [[ ! -d "$WORKSPACE/src-build-dir" ]]; then
377 mkdir "$WORKSPACE/src-build-dir"
379 if [[ "$DEBUG" != 0 ]]; then
380 git clone https://github.com/curoverse/arvados.git src-build-dir
382 git clone -q https://github.com/curoverse/arvados.git src-build-dir
386 cd "$WORKSPACE/src-build-dir"
387 # just in case, check out master
388 if [[ "$DEBUG" != 0 ]]; then
391 # go into detached-head state
392 git checkout `git log --format=format:%h -n1 .`
394 git checkout -q master
396 # go into detached-head state
397 git checkout -q `git log --format=format:%h -n1 .`
400 git log --format=format:%H -n1 . > git-commit.version
402 # Build arvados src deb package
404 PKG_VERSION=$(version_from_git)
406 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"
408 # clean up, check out master and step away from detached-head state
409 cd "$WORKSPACE/src-build-dir"
410 if [[ "$DEBUG" != 0 ]]; then
413 git checkout -q master
417 export GOPATH=$(mktemp -d)
418 mkdir -p "$GOPATH/src/git.curoverse.com"
419 ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git"
422 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/keepstore"
423 PKG_VERSION=$(version_from_git)
424 go get "git.curoverse.com/arvados.git/services/keepstore"
426 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"
429 cd "$GOPATH/src/git.curoverse.com/arvados.git/sdk/go"
430 GO_SDK_VERSION=$(version_from_git)
431 GO_SDK_TIMESTAMP=$(timestamp_from_git)
434 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/keepproxy"
435 KEEPPROXY_VERSION=$(version_from_git)
436 KEEPPROXY_TIMESTAMP=$(timestamp_from_git)
438 if [[ "$GO_SDK_TIMESTAMP" -gt "$KEEPPROXY_TIMESTAMP" ]]; then
439 PKG_VERSION=$GO_SDK_VERSION
441 PKG_VERSION=$KEEPPROXY_VERSION
444 go get "git.curoverse.com/arvados.git/services/keepproxy"
446 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"
449 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/datamanager"
450 DATAMANAGER_VERSION=$(version_from_git)
451 DATAMANAGER_TIMESTAMP=$(timestamp_from_git)
453 if [[ "$GO_SDK_TIMESTAMP" -gt "$DATAMANAGER_TIMESTAMP" ]]; then
454 PKG_VERSION=$GO_SDK_VERSION
456 PKG_VERSION=$DATAMANAGER_VERSION
459 go get "git.curoverse.com/arvados.git/services/datamanager"
461 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."
464 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/arv-git-httpd"
465 ARVGITHTTPD_VERSION=$(version_from_git)
466 ARVGITHTTPD_TIMESTAMP=$(timestamp_from_git)
468 if [[ "$GO_SDK_TIMESTAMP" -gt "$ARVGITHTTPD_TIMESTAMP" ]]; then
469 PKG_VERSION=$GO_SDK_VERSION
471 PKG_VERSION=$ARVGITHTTPD_VERSION
474 go get "git.curoverse.com/arvados.git/services/arv-git-httpd"
476 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."
479 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/crunchstat"
480 PKG_VERSION=$(version_from_git)
481 go get "git.curoverse.com/arvados.git/services/crunchstat"
483 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"
486 # Please resist the temptation to add --no-python-fix-name to the fpm call here
487 # (which would remove the python- prefix from the package name), because this
488 # package is a dependency of arvados-fuse, and fpm can not omit the python-
489 # prefix from only one of the dependencies of a package... Maybe I could
490 # whip up a patch and send it upstream, but that will be for another day. Ward,
493 # Python version numbering is obscure. Strip dashes and replace them with dots
494 # to match our other version numbers. Cf. commit 4afcb8c, compliance with PEP-440.
495 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"
498 # Please see comment about --no-python-fix-name above; we stay consistent and do
499 # not omit the python- prefix first.
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/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"
507 # Python version numbering is obscure. Strip dashes and replace them with dots
508 # to match our other version numbers. Cf. commit 4afcb8c, compliance with PEP-440.
509 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"
511 # The Docker image cleaner
513 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"
516 for deppkg in python-gflags pyvcf google-api-python-client oauth2client \
517 pyasn1 pyasn1-modules rsa uritemplate httplib2 ws4py virtualenv \
518 pykka apache-libcloud requests six pyexecjs jsonschema ciso8601 \
519 pycrypto backports.ssl_match_hostname; do
520 build_and_scp_deb "$deppkg"
523 # Python 3 dependencies
524 for deppkg in docker-py six requests; do
525 # The empty string is the vendor argument: these aren't Curoverse software.
526 build_and_scp_deb "$deppkg" "python3-$deppkg" "" python3
529 # Build the API server package
531 cd "$WORKSPACE/services/api"
533 API_VERSION=$(version_from_git)
534 PACKAGE_NAME=arvados-api-server
536 if [[ ! -d "$WORKSPACE/services/api/tmp" ]]; then
537 mkdir $WORKSPACE/services/api/tmp
540 BUNDLE_OUTPUT=`bundle install --path vendor/bundle`
542 if [[ "$DEBUG" != 0 ]]; then
546 /usr/bin/git rev-parse HEAD > git-commit.version
550 # Annoyingly, we require a database.yml file for rake assets:precompile to work. So for now,
551 # we do that in the upgrade script.
552 # TODO: add bogus database.yml file so we can precompile the assets and put them in the
553 # package. Then remove that database.yml file again. It has to be a valid file though.
554 #RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile
556 # This is the complete package with vendor/bundle included.
557 # It's big, so we do not build it by default.
558 if [[ "$BUILD_BUNDLE_PACKAGES" != 0 ]]; then
559 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" "$FORMAT" "-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")
561 if [[ "$DEBUG" != 0 ]]; then
563 echo "${COMMAND_ARR[@]}"
567 FPM_RESULTS=$("${COMMAND_ARR[@]}")
569 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
572 # Build the 'bare' package without vendor/bundle.
573 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" "$FORMAT" "-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")
575 if [[ "$DEBUG" != 0 ]]; then
577 echo "${COMMAND_ARR[@]}"
581 FPM_RESULTS=$("${COMMAND_ARR[@]}")
583 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
585 # API server package build done
587 # Build the workbench server package
589 cd "$WORKSPACE/apps/workbench"
591 WORKBENCH_VERSION=$(version_from_git)
592 PACKAGE_NAME=arvados-workbench
594 if [[ ! -d "$WORKSPACE/apps/workbench/tmp" ]]; then
595 mkdir $WORKSPACE/apps/workbench/tmp
598 BUNDLE_OUTPUT=`bundle install --path vendor/bundle`
600 if [[ "$DEBUG" != 0 ]]; then
604 /usr/bin/git rev-parse HEAD > git-commit.version
606 # clear the tmp directory; the asset generation step will recreate tmp/cache/assets,
607 # and we want that in the package, so it's easier to not exclude the tmp directory
608 # from the package - empty it instead.
609 rm -rf $WORKSPACE/apps/workbench/tmp/*
611 RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile >/dev/null
615 # This is the complete package with vendor/bundle included.
616 # It's big, so we do not build it by default.
617 if [[ "$BUILD_BUNDLE_PACKAGES" != 0 ]]; then
619 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" "$FORMAT" "-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")
621 if [[ "$DEBUG" != 0 ]]; then
623 echo "${COMMAND_ARR[@]}"
627 FPM_RESULTS=$("${COMMAND_ARR[@]}")
629 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
632 # Build the 'bare' package without vendor/bundle.
634 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" "$FORMAT" "-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")
636 if [[ "$DEBUG" != 0 ]]; then
638 echo "${COMMAND_ARR[@]}"
642 FPM_RESULTS=$("${COMMAND_ARR[@]}")
644 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
646 # Workbench package build done
648 # Finally, publish the packages, if necessary
649 if [[ "$UPLOAD" != 0 && "$CALL_FREIGHT" != 0 ]]; then
650 ssh -p2222 $APTUSER@$APTSERVER -t "cd tmp && ls -laF *deb && freight add *deb apt/wheezy && freight cache && rm -f *deb"
652 if [[ "$UPLOAD" != 0 ]]; then
653 echo "No new packages generated. No freight run necessary."
657 # clean up temporary GOPATH