2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: AGPL-3.0
6 read -rd "\000" helpmessage <<EOF
7 Build an arvados/cluster-activity Docker image from local git tree.
9 Intended for use by developers working on arvados/cluster-activity or
10 and need to run a crunch job with a custom package version.
13 WORKSPACE=/path/to/arvados $(basename $0)
15 WORKSPACE=path Path to the Arvados source tree to build packages from
21 if [[ -z "$WORKSPACE" ]] ; then
22 export WORKSPACE=$(readlink -f $(dirname $0)/../..)
23 echo "Using WORKSPACE $WORKSPACE"
26 context_dir="$(mktemp --directory --tmpdir dev-jobs.XXXXXXXX)"
27 trap 'rm -rf "$context_dir"' EXIT INT TERM QUIT
29 cluster_activity_version=$(cd $WORKSPACE/tools/cluster-activity && python3 arvados_version.py)
31 for src_dir in "$WORKSPACE/sdk/python" "$WORKSPACE/tools/cluster-activity" ; do
32 env -C "$src_dir" python3 setup.py sdist --dist-dir="$context_dir"
36 docker build --no-cache \
37 -f "$WORKSPACE/tools/cluster-activity/cluster-activity.dockerfile" \
38 -t arvados/cluster-activity:$cluster_activity_version \