X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5d825f773a037ccf977918cd4dff866792390826..f8f6f226e9c5d74a2306b25df751018ab354cde0:/build/build-dev-docker-jobs-image.sh diff --git a/build/build-dev-docker-jobs-image.sh b/build/build-dev-docker-jobs-image.sh index 0e570d5f31..583b7a54f7 100755 --- a/build/build-dev-docker-jobs-image.sh +++ b/build/build-dev-docker-jobs-image.sh @@ -16,7 +16,7 @@ Syntax: WORKSPACE=path Path to the Arvados source tree to build packages from CWLTOOL=path (optional) Path to cwltool git repository. SALAD=path (optional) Path to schema_salad git repository. -PYCMD=pythonexec (optional) Specify the python3 executable to use in the docker image. Defaults to "python3". +CWL_UTILS=path (optional) Path to cwl-utils git repository. EOF @@ -27,53 +27,26 @@ if [[ -z "$WORKSPACE" ]] ; then echo "Using WORKSPACE $WORKSPACE" fi -if [[ -z "$ARVADOS_API_HOST" || -z "$ARVADOS_API_TOKEN" ]] ; then - echo "$helpmessage" - echo - echo "Must set ARVADOS_API_HOST and ARVADOS_API_TOKEN" - exit 1 -fi - -cd "$WORKSPACE" - -py=python3 -pipcmd=pip -if [[ -n "$PYCMD" ]] ; then - py="$PYCMD" -fi -if [[ $py = python3 ]] ; then - pipcmd=pip3 -fi +context_dir="$(mktemp --directory --tmpdir dev-jobs.XXXXXXXX)" +trap 'rm -rf "$context_dir"' EXIT INT TERM QUIT -(cd sdk/python && python3 setup.py sdist) -sdk=$(cd sdk/python/dist && ls -t arvados-python-client-*.tar.gz | head -n1) - -(cd sdk/cwl && python3 setup.py sdist) -runner=$(cd sdk/cwl/dist && ls -t arvados-cwl-runner-*.tar.gz | head -n1) - -rm -rf sdk/cwl/salad_dist -mkdir -p sdk/cwl/salad_dist -if [[ -n "$SALAD" ]] ; then - (cd "$SALAD" && python3 setup.py sdist) - salad=$(cd "$SALAD/dist" && ls -t schema-salad-*.tar.gz | head -n1) - cp "$SALAD/dist/$salad" $WORKSPACE/sdk/cwl/salad_dist -fi - -rm -rf sdk/cwl/cwltool_dist -mkdir -p sdk/cwl/cwltool_dist -if [[ -n "$CWLTOOL" ]] ; then - (cd "$CWLTOOL" && python3 setup.py sdist) - cwltool=$(cd "$CWLTOOL/dist" && ls -t cwltool-*.tar.gz | head -n1) - cp "$CWLTOOL/dist/$cwltool" $WORKSPACE/sdk/cwl/cwltool_dist -fi +for src_dir in "$WORKSPACE/sdk/python" "${CWLTOOL:-}" "${CWL_UTILS:-}" "${SALAD:-}" "$WORKSPACE/tools/crunchstat-summary" "$WORKSPACE/sdk/cwl"; do + if [[ -z "$src_dir" ]]; then + continue + fi + env -C "$src_dir" python3 setup.py sdist --dist-dir="$context_dir" +done +cd "$WORKSPACE" . build/run-library.sh - +# This defines python_sdk_version and cwl_runner_version with python-style +# package suffixes (.dev/rc) calculate_python_sdk_cwl_package_versions -cwl_runner_version=$(echo -n $cwl_runner_version | sed s/~dev/.dev/g | sed s/~rc/rc/g) - set -x -docker build --no-cache --build-arg sdk=$sdk --build-arg runner=$runner --build-arg salad=$salad --build-arg cwltool=$cwltool --build-arg pythoncmd=$py --build-arg pipcmd=$pipcmd -f "$WORKSPACE/sdk/dev-jobs.dockerfile" -t arvados/jobs:$cwl_runner_version "$WORKSPACE/sdk" -echo arv-keepdocker arvados/jobs $cwl_runner_version +docker build --no-cache \ + -f "$WORKSPACE/sdk/dev-jobs.dockerfile" \ + -t arvados/jobs:$cwl_runner_version \ + "$context_dir" + arv-keepdocker arvados/jobs $cwl_runner_version