projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
12483: Track memory use. Flush filled blocks while writing.
[arvados.git]
/
build
/
run-build-packages.sh
diff --git
a/build/run-build-packages.sh
b/build/run-build-packages.sh
index 490e4307ec68ab7cd11e18cd5d911bd91a578c6d..5ce2d9246bfbb5d7d974a270285bddb641fbadc0 100755
(executable)
--- a/
build/run-build-packages.sh
+++ b/
build/run-build-packages.sh
@@
-1,7
+1,10
@@
#!/bin/bash
#!/bin/bash
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
. `dirname "$(readlink -f "$0")"`/run-library.sh
. `dirname "$(readlink -f "$0")"`/run-library.sh
-. `dirname "$(readlink -f "$0")"`/libcloud-pin
+. `dirname "$(readlink -f "$0")"`/libcloud-pin
.sh
read -rd "\000" helpmessage <<EOF
$(basename $0): Build Arvados packages
read -rd "\000" helpmessage <<EOF
$(basename $0): Build Arvados packages
@@
-32,8
+35,6
@@
DEBUG=${ARVADOS_DEBUG:-0}
TARGET=debian8
COMMAND=
TARGET=debian8
COMMAND=
-RAILS_PACKAGE_ITERATION=7
-
PARSEDOPTS=$(getopt --name "$0" --longoptions \
help,build-bundle-packages,debug,target:,only-build: \
-- "" "$@")
PARSEDOPTS=$(getopt --name "$0" --longoptions \
help,build-bundle-packages,debug,target:,only-build: \
-- "" "$@")
@@
-106,12
+107,18
@@
case "$TARGET" in
debian8)
FORMAT=deb
;;
debian8)
FORMAT=deb
;;
+ debian9)
+ FORMAT=deb
+ ;;
ubuntu1204)
FORMAT=deb
;;
ubuntu1404)
FORMAT=deb
;;
ubuntu1204)
FORMAT=deb
;;
ubuntu1404)
FORMAT=deb
;;
+ ubuntu1604)
+ FORMAT=deb
+ ;;
centos7)
FORMAT=rpm
PYTHON2_PACKAGE=$(rpm -qf "$(which python$PYTHON2_VERSION)" --queryformat '%{NAME}\n')
centos7)
FORMAT=rpm
PYTHON2_PACKAGE=$(rpm -qf "$(which python$PYTHON2_VERSION)" --queryformat '%{NAME}\n')
@@
-213,7
+220,7
@@
if [[ -z "$ONLY_BUILD" ]] || [[ "libarvados-perl" = "$ONLY_BUILD" ]] ; then
make install INSTALLDIRS=perl >"$STDOUT_IF_DEBUG" && \
fpm_build install/lib/=/usr/share libarvados-perl \
"Curoverse, Inc." dir "$(version_from_git)" install/man/=/usr/share/man \
make install INSTALLDIRS=perl >"$STDOUT_IF_DEBUG" && \
fpm_build install/lib/=/usr/share libarvados-perl \
"Curoverse, Inc." dir "$(version_from_git)" install/man/=/usr/share/man \
- "$WORKSPACE/
LICENSE-2.0.txt=/usr/share/doc/libarvados-perl/LICENSE
-2.0.txt" && \
+ "$WORKSPACE/
apache-2.0.txt=/usr/share/doc/libarvados-perl/apache
-2.0.txt" && \
mv --no-clobber libarvados-perl*.$FORMAT "$WORKSPACE/packages/$TARGET/"
fi
fi
mv --no-clobber libarvados-perl*.$FORMAT "$WORKSPACE/packages/$TARGET/"
fi
fi
@@
-257,7
+264,7
@@
handle_python_package
arvados_src_version="$(version_from_git)"
cd $WORKSPACE/packages/$TARGET
arvados_src_version="$(version_from_git)"
cd $WORKSPACE/packages/$TARGET
- test_package_presence arvados-src $arvados_src_version src
+ test_package_presence arvados-src $arvados_src_version src
""
if [[ "$?" == "0" ]]; then
cd "$WORKSPACE"
if [[ "$?" == "0" ]]; then
cd "$WORKSPACE"
@@
-333,6
+340,7
@@
fi
# Go binaries
cd $WORKSPACE/packages/$TARGET
export GOPATH=$(mktemp -d)
# Go binaries
cd $WORKSPACE/packages/$TARGET
export GOPATH=$(mktemp -d)
+go get -v github.com/kardianos/govendor
package_go_binary sdk/go/crunchrunner crunchrunner \
"Crunchrunner executes a command inside a container and uploads the output"
package_go_binary services/arv-git-httpd arvados-git-httpd \
package_go_binary sdk/go/crunchrunner crunchrunner \
"Crunchrunner executes a command inside a container and uploads the output"
package_go_binary services/arv-git-httpd arvados-git-httpd \
@@
-345,6
+353,8
@@
package_go_binary services/crunch-run crunch-run \
"Supervise a single Crunch container"
package_go_binary services/crunchstat crunchstat \
"Gather cpu/memory/network statistics of running Crunch jobs"
"Supervise a single Crunch container"
package_go_binary services/crunchstat crunchstat \
"Gather cpu/memory/network statistics of running Crunch jobs"
+package_go_binary services/health arvados-health \
+ "Check health of all Arvados cluster services"
package_go_binary services/keep-balance keep-balance \
"Rebalance and garbage-collect data blocks stored in Arvados Keep"
package_go_binary services/keepproxy keepproxy \
package_go_binary services/keep-balance keep-balance \
"Rebalance and garbage-collect data blocks stored in Arvados Keep"
package_go_binary services/keepproxy keepproxy \
@@
-405,7
+415,7
@@
fi
saladversion=$(cat "$WORKSPACE/sdk/cwl/setup.py" | grep schema-salad== | sed "s/.*==\(.*\)'.*/\1/")
test_package_presence python-schema-salad "$saladversion" python
if [[ "$?" == "0" ]]; then
saladversion=$(cat "$WORKSPACE/sdk/cwl/setup.py" | grep schema-salad== | sed "s/.*==\(.*\)'.*/\1/")
test_package_presence python-schema-salad "$saladversion" python
if [[ "$?" == "0" ]]; then
- fpm_build schema_salad "" "" python $saladversion --depends "${PYTHON2_PKG_PREFIX}-lockfile >= 1:0.12.2-2"
+ fpm_build schema_salad "" "" python $saladversion --depends "${PYTHON2_PKG_PREFIX}-lockfile >= 1:0.12.2-2"
--depends "${PYTHON2_PKG_PREFIX}-avro = 1.8.1-2"
fi
# And for cwltool we have the same problem as for schema_salad. Ward, 2016-03-17
fi
# And for cwltool we have the same problem as for schema_salad. Ward, 2016-03-17
@@
-519,6
+529,16
@@
while read -r line || [[ -n "$line" ]]; do
pkgtype=${arr[4]}
arch=${arr[5]}
extra=${arr[6]}
pkgtype=${arr[4]}
arch=${arr[5]}
extra=${arr[6]}
+ declare -a 'extra_arr=('"$extra"')'
+
+ if [[ "$FORMAT" == "rpm" ]]; then
+ if [[ "$arch" == "all" ]]; then
+ arch="noarch"
+ fi
+ if [[ "$arch" == "amd64" ]]; then
+ arch="x86_64"
+ fi
+ fi
if [[ "$pkgtype" == "python" ]]; then
outname=$(echo "$name" | sed -e 's/^python-//' -e 's/_/-/g' -e "s/^/${PYTHON2_PKG_PREFIX}-/")
if [[ "$pkgtype" == "python" ]]; then
outname=$(echo "$name" | sed -e 's/^python-//' -e 's/_/-/g' -e "s/^/${PYTHON2_PKG_PREFIX}-/")
@@
-548,7
+568,7
@@
while read -r line || [[ -n "$line" ]]; do
"python$PYTHON2_VERSION" setup.py $DASHQ_UNLESS_DEBUG egg_info build
chmod -R go+rX .
set +e
"python$PYTHON2_VERSION" setup.py $DASHQ_UNLESS_DEBUG egg_info build
chmod -R go+rX .
set +e
- fpm_build . "$outname" "" "$pkgtype" "$version" --iteration "$iteration"
$extra
+ fpm_build . "$outname" "" "$pkgtype" "$version" --iteration "$iteration"
"${extra_arr[@]}"
# The upload step uses the package timestamp to determine
# if it is new. --no-clobber plays nice with that.
mv --no-clobber "$outname"*.$FORMAT "$WORKSPACE/packages/$TARGET"
# The upload step uses the package timestamp to determine
# if it is new. --no-clobber plays nice with that.
mv --no-clobber "$outname"*.$FORMAT "$WORKSPACE/packages/$TARGET"
@@
-565,7
+585,7
@@
while read -r line || [[ -n "$line" ]]; do
*)
test_package_presence $outname $version $pkgtype $iteration $arch
if [[ "$?" == "0" ]]; then
*)
test_package_presence $outname $version $pkgtype $iteration $arch
if [[ "$?" == "0" ]]; then
- fpm_build "$name" "$outname" "" "$pkgtype" "$version" --iteration "$iteration"
$extra
+ fpm_build "$name" "$outname" "" "$pkgtype" "$version" --iteration "$iteration"
"${extra_arr[@]}"
fi
;;
esac
fi
;;
esac
@@
-602,7
+622,9
@@
if [[ "$?" == "0" ]] ; then
\cp config/application.yml.example config/application.yml -f
\cp config/environments/production.rb.example config/environments/production.rb -f
sed -i 's/secret_token: ~/secret_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/' config/application.yml
\cp config/application.yml.example config/application.yml -f
\cp config/environments/production.rb.example config/environments/production.rb -f
sed -i 's/secret_token: ~/secret_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/' config/application.yml
+ sed -i 's/keep_web_url: false/keep_web_url: exampledotcom/' config/application.yml
+ RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake npm:install >/dev/null
RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile >/dev/null
# Remove generated configuration files so they don't go in the package.
RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile >/dev/null
# Remove generated configuration files so they don't go in the package.