projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
12085: Counters support for status tracker.
[arvados.git]
/
build
/
run-build-test-packages-one-target.sh
diff --git
a/build/run-build-test-packages-one-target.sh
b/build/run-build-test-packages-one-target.sh
index ff6bad4a71fed426b9f7087e317d98d3ef93ee43..7bdaacac52268a49b6fe929f0f467da061682662 100755
(executable)
--- a/
build/run-build-test-packages-one-target.sh
+++ b/
build/run-build-test-packages-one-target.sh
@@
-1,4
+1,7
@@
#!/bin/bash
#!/bin/bash
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
read -rd "\000" helpmessage <<EOF
$(basename $0): Build, test and (optionally) upload packages for one target
read -rd "\000" helpmessage <<EOF
$(basename $0): Build, test and (optionally) upload packages for one target
@@
-7,10
+10,14
@@
Syntax:
WORKSPACE=/path/to/arvados $(basename $0) [options]
--target <target>
WORKSPACE=/path/to/arvados $(basename $0) [options]
--target <target>
- Distribution to build packages for (default: debian
7
)
+ Distribution to build packages for (default: debian
8
)
--upload
If the build and test steps are successful, upload the packages
to a remote apt repository (default: false)
--upload
If the build and test steps are successful, upload the packages
to a remote apt repository (default: false)
+--build-version <version>
+ Version to build (default:
+ \$ARVADOS_BUILDING_VERSION-\$ARVADOS_BUILDING_ITERATION or
+ 0.1.timestamp.commithash)
WORKSPACE=path Path to the Arvados source tree to build packages from
WORKSPACE=path Path to the Arvados source tree to build packages from
@@
-33,15
+40,17
@@
if ! [[ -d "$WORKSPACE" ]]; then
fi
PARSEDOPTS=$(getopt --name "$0" --longoptions \
fi
PARSEDOPTS=$(getopt --name "$0" --longoptions \
- help,upload,target: \
+ help,upload,target:
,build-version:
\
-- "" "$@")
if [ $? -ne 0 ]; then
exit 1
fi
-- "" "$@")
if [ $? -ne 0 ]; then
exit 1
fi
-TARGET=debian
7
+TARGET=debian
8
UPLOAD=0
UPLOAD=0
+declare -a build_args=()
+
eval set -- "$PARSEDOPTS"
while [ $# -gt 0 ]; do
case "$1" in
eval set -- "$PARSEDOPTS"
while [ $# -gt 0 ]; do
case "$1" in
@@
-56,6
+65,10
@@
while [ $# -gt 0 ]; do
--upload)
UPLOAD=1
;;
--upload)
UPLOAD=1
;;
+ --build-version)
+ build_args+=("$1" "$2")
+ shift
+ ;;
--)
if [ $# -gt 1 ]; then
echo >&2 "$0: unrecognized argument '$2'. Try: $0 --help"
--)
if [ $# -gt 1 ]; then
echo >&2 "$0: unrecognized argument '$2'. Try: $0 --help"
@@
-66,6
+79,8
@@
while [ $# -gt 0 ]; do
shift
done
shift
done
+build_args+=(--target "$TARGET")
+
exit_cleanly() {
trap - INT
report_outcomes
exit_cleanly() {
trap - INT
report_outcomes
@@
-78,7
+93,7
@@
COLUMNS=80
title "Start build packages"
timer_reset
title "Start build packages"
timer_reset
-$WORKSPACE/build/run-build-packages-one-target.sh
--target $TARGET
+$WORKSPACE/build/run-build-packages-one-target.sh
"${build_args[@]}"
checkexit $? "build packages"
title "End of build packages (`timer`)"
checkexit $? "build packages"
title "End of build packages (`timer`)"
@@
-87,7
+102,7
@@
title "Start test packages"
timer_reset
if [ ${#failures[@]} -eq 0 ]; then
timer_reset
if [ ${#failures[@]} -eq 0 ]; then
- $WORKSPACE/build/run-build-packages-one-target.sh
--target $TARGET
--test-packages
+ $WORKSPACE/build/run-build-packages-one-target.sh
"${build_args[@]}"
--test-packages
else
echo "Skipping package upload, there were errors building the packages"
fi
else
echo "Skipping package upload, there were errors building the packages"
fi
@@
-100,6
+115,7
@@
if [[ "$UPLOAD" != 0 ]]; then
timer_reset
if [ ${#failures[@]} -eq 0 ]; then
timer_reset
if [ ${#failures[@]} -eq 0 ]; then
+ echo "/usr/local/arvados-dev/jenkins/run_upload_packages.py -H jenkinsapt@apt.arvados.org -o Port=2222 --workspace $WORKSPACE $TARGET"
/usr/local/arvados-dev/jenkins/run_upload_packages.py -H jenkinsapt@apt.arvados.org -o Port=2222 --workspace $WORKSPACE $TARGET
else
echo "Skipping package upload, there were errors building and/or testing the packages"
/usr/local/arvados-dev/jenkins/run_upload_packages.py -H jenkinsapt@apt.arvados.org -o Port=2222 --workspace $WORKSPACE $TARGET
else
echo "Skipping package upload, there were errors building and/or testing the packages"