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 # Build arvados src deb package
396 PKG_VERSION=$(version_from_git)
398 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"
400 # clean up, check out master and step away from detached-head state
401 cd "$WORKSPACE/src-build-dir"
402 if [[ "$DEBUG" != 0 ]]; then
405 git checkout -q master
409 export GOPATH=$(mktemp -d)
410 mkdir -p "$GOPATH/src/git.curoverse.com"
411 ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git"
414 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/keepstore"
415 PKG_VERSION=$(version_from_git)
416 go get "git.curoverse.com/arvados.git/services/keepstore"
418 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"
421 cd "$GOPATH/src/git.curoverse.com/arvados.git/sdk/go"
422 GO_SDK_VERSION=$(version_from_git)
423 GO_SDK_TIMESTAMP=$(timestamp_from_git)
426 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/keepproxy"
427 KEEPPROXY_VERSION=$(version_from_git)
428 KEEPPROXY_TIMESTAMP=$(timestamp_from_git)
430 if [[ "$GO_SDK_TIMESTAMP" -gt "$KEEPPROXY_TIMESTAMP" ]]; then
431 PKG_VERSION=$GO_SDK_VERSION
433 PKG_VERSION=$KEEPPROXY_VERSION
436 go get "git.curoverse.com/arvados.git/services/keepproxy"
438 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"
441 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/datamanager"
442 DATAMANAGER_VERSION=$(version_from_git)
443 DATAMANAGER_TIMESTAMP=$(timestamp_from_git)
445 if [[ "$GO_SDK_TIMESTAMP" -gt "$DATAMANAGER_TIMESTAMP" ]]; then
446 PKG_VERSION=$GO_SDK_VERSION
448 PKG_VERSION=$DATAMANAGER_VERSION
451 go get "git.curoverse.com/arvados.git/services/datamanager"
453 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."
456 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/arv-git-httpd"
457 ARVGITHTTPD_VERSION=$(version_from_git)
458 ARVGITHTTPD_TIMESTAMP=$(timestamp_from_git)
460 if [[ "$GO_SDK_TIMESTAMP" -gt "$ARVGITHTTPD_TIMESTAMP" ]]; then
461 PKG_VERSION=$GO_SDK_VERSION
463 PKG_VERSION=$ARVGITHTTPD_VERSION
466 go get "git.curoverse.com/arvados.git/services/arv-git-httpd"
468 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."
471 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/crunchstat"
472 PKG_VERSION=$(version_from_git)
473 go get "git.curoverse.com/arvados.git/services/crunchstat"
475 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"
478 # Please resist the temptation to add --no-python-fix-name to the fpm call here
479 # (which would remove the python- prefix from the package name), because this
480 # package is a dependency of arvados-fuse, and fpm can not omit the python-
481 # prefix from only one of the dependencies of a package... Maybe I could
482 # whip up a patch and send it upstream, but that will be for another day. Ward,
485 # Python version numbering is obscure. Strip dashes and replace them with dots
486 # to match our other version numbers. Cf. commit 4afcb8c, compliance with PEP-440.
487 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"
490 # Please see comment about --no-python-fix-name above; we stay consistent and do
491 # not omit the python- prefix first.
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/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"
499 # Python version numbering is obscure. Strip dashes and replace them with dots
500 # to match our other version numbers. Cf. commit 4afcb8c, compliance with PEP-440.
501 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"
503 # The Docker image cleaner
505 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"
508 for deppkg in python-gflags pyvcf google-api-python-client oauth2client \
509 pyasn1 pyasn1-modules rsa uritemplate httplib2 ws4py virtualenv \
510 pykka apache-libcloud requests six pyexecjs jsonschema ciso8601 \
511 pycrypto backports.ssl_match_hostname; do
512 build_and_scp_deb "$deppkg"
515 # Python 3 dependencies
516 for deppkg in docker-py six requests; do
517 # The empty string is the vendor argument: these aren't Curoverse software.
518 build_and_scp_deb "$deppkg" "python3-$deppkg" "" python3
521 # Build the API server package
523 cd "$WORKSPACE/services/api"
525 API_VERSION=$(version_from_git)
526 PACKAGE_NAME=arvados-api-server
528 if [[ ! -d "$WORKSPACE/services/api/tmp" ]]; then
529 mkdir $WORKSPACE/services/api/tmp
532 BUNDLE_OUTPUT=`bundle install --path vendor/bundle`
534 if [[ "$DEBUG" != 0 ]]; then
538 /usr/bin/git rev-parse HEAD > git-commit.version
542 # Annoyingly, we require a database.yml file for rake assets:precompile to work. So for now,
543 # we do that in the upgrade script.
544 # TODO: add bogus database.yml file so we can precompile the assets and put them in the
545 # package. Then remove that database.yml file again. It has to be a valid file though.
546 #RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile
548 # This is the complete package with vendor/bundle included.
549 # It's big, so we do not build it by default.
550 if [[ "$BUILD_BUNDLE_PACKAGES" != 0 ]]; then
551 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")
553 if [[ "$DEBUG" != 0 ]]; then
555 echo "${COMMAND_ARR[@]}"
559 FPM_RESULTS=$("${COMMAND_ARR[@]}")
561 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
564 # Build the 'bare' package without vendor/bundle.
565 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")
567 if [[ "$DEBUG" != 0 ]]; then
569 echo "${COMMAND_ARR[@]}"
573 FPM_RESULTS=$("${COMMAND_ARR[@]}")
575 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
577 # API server package build done
579 # Build the workbench server package
581 cd "$WORKSPACE/apps/workbench"
583 WORKBENCH_VERSION=$(version_from_git)
584 PACKAGE_NAME=arvados-workbench
586 if [[ ! -d "$WORKSPACE/apps/workbench/tmp" ]]; then
587 mkdir $WORKSPACE/apps/workbench/tmp
590 BUNDLE_OUTPUT=`bundle install --path vendor/bundle`
592 if [[ "$DEBUG" != 0 ]]; then
596 /usr/bin/git rev-parse HEAD > git-commit.version
598 # clear the tmp directory; the asset generation step will recreate tmp/cache/assets,
599 # and we want that in the package, so it's easier to not exclude the tmp directory
600 # from the package - empty it instead.
601 rm -rf $WORKSPACE/apps/workbench/tmp/*
603 RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile >/dev/null
607 # This is the complete package with vendor/bundle included.
608 # It's big, so we do not build it by default.
609 if [[ "$BUILD_BUNDLE_PACKAGES" != 0 ]]; then
611 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")
613 if [[ "$DEBUG" != 0 ]]; then
615 echo "${COMMAND_ARR[@]}"
619 FPM_RESULTS=$("${COMMAND_ARR[@]}")
621 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
624 # Build the 'bare' package without vendor/bundle.
626 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")
628 if [[ "$DEBUG" != 0 ]]; then
630 echo "${COMMAND_ARR[@]}"
634 FPM_RESULTS=$("${COMMAND_ARR[@]}")
636 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
638 # Workbench package build done
640 # Finally, publish the packages, if necessary
641 if [[ "$UPLOAD" != 0 && "$CALL_FREIGHT" != 0 ]]; then
642 ssh -p2222 $APTUSER@$APTSERVER -t "cd tmp && ls -laF *deb && freight add *deb apt/wheezy && freight cache && rm -f *deb"
644 if [[ "$UPLOAD" != 0 ]]; then
645 echo "No new packages generated. No freight run necessary."
649 # clean up temporary GOPATH