projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
21700: Install Bundler system-wide in Rails postinst
[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 aa4acb6a2bf7817f933f9bdb85b74789c91b154b..d1217162e6109ad74bddb27ba8ea847092d074cb 100755
(executable)
--- a/
build/run-build-test-packages-one-target.sh
+++ b/
build/run-build-test-packages-one-target.sh
@@
-7,10
+7,10
@@
read -rd "\000" helpmessage <<EOF
$(basename $0): Build, test and (optionally) upload packages for one target
Syntax:
$(basename $0): Build, test and (optionally) upload packages for one target
Syntax:
- WORKSPACE=/path/to/arvados $(basename $0) [options]
+ WORKSPACE=/path/to/arvados $(basename $0)
--target <target>
[options]
--target <target>
--target <target>
- Distribution to build packages for
(default: debian10)
+ Distribution to build packages for
--only-build <package>
Build only a specific package (or ONLY_BUILD from environment)
--arch <arch>
--only-build <package>
Build only a specific package (or ONLY_BUILD from environment)
--arch <arch>
@@
-31,6
+31,8
@@
Syntax:
Version to build (default:
\$ARVADOS_BUILDING_VERSION-\$ARVADOS_BUILDING_ITERATION or
0.1.timestamp.commithash)
Version to build (default:
\$ARVADOS_BUILDING_VERSION-\$ARVADOS_BUILDING_ITERATION or
0.1.timestamp.commithash)
+--skip-docker-build
+ Don't try to build Docker images
WORKSPACE=path Path to the Arvados source tree to build packages from
WORKSPACE=path Path to the Arvados source tree to build packages from
@@
-53,16
+55,16
@@
if ! [[ -d "$WORKSPACE" ]]; then
fi
PARSEDOPTS=$(getopt --name "$0" --longoptions \
fi
PARSEDOPTS=$(getopt --name "$0" --longoptions \
- help,debug,upload,rc,target:,force-test,only-build:,force-build,arch:,build-version: \
+ help,debug,upload,rc,target:,force-test,only-build:,force-build,arch:,build-version:
,skip-docker-build
\
-- "" "$@")
if [ $? -ne 0 ]; then
exit 1
fi
-- "" "$@")
if [ $? -ne 0 ]; then
exit 1
fi
-TARGET=debian10
UPLOAD=0
RC=0
DEBUG=
UPLOAD=0
RC=0
DEBUG=
+TARGET=
declare -a build_args=()
declare -a build_args=()
@@
-102,6
+104,9
@@
while [ $# -gt 0 ]; do
build_args+=("$1" "$2")
shift
;;
build_args+=("$1" "$2")
shift
;;
+ --skip-docker-build)
+ SKIP_DOCKER_BUILD=1
+ ;;
--)
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"
@@
-112,6
+117,14
@@
while [ $# -gt 0 ]; do
shift
done
shift
done
+if [[ -z "$TARGET" ]]; then
+ echo "FATAL: --target must be specified" >&2
+ exit 2
+elif [[ ! -d "$WORKSPACE/build/package-build-dockerfiles/$TARGET" ]]; then
+ echo "FATAL: unknown build target '$TARGET'" >&2
+ exit 2
+fi
+
build_args+=(--target "$TARGET")
if [[ -n "$ONLY_BUILD" ]]; then
build_args+=(--target "$TARGET")
if [[ -n "$ONLY_BUILD" ]]; then
@@
-126,6
+139,10
@@
if [[ -n "$FORCE_TEST" ]]; then
build_args+=(--force-test)
fi
build_args+=(--force-test)
fi
+if [[ "$SKIP_DOCKER_BUILD" = 1 ]]; then
+ build_args+=(--skip-docker-build)
+fi
+
if [[ -n "$ARCH" ]]; then
build_args+=(--arch "$ARCH")
fi
if [[ -n "$ARCH" ]]; then
build_args+=(--arch "$ARCH")
fi