X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c6c2f3518bc745eed95b5f5b81db5d17db4366ff..2e74236fa27822addd856f194befc28382990ce0:/build/run-build-docker-jobs-image.sh diff --git a/build/run-build-docker-jobs-image.sh b/build/run-build-docker-jobs-image.sh index d2c9f7274b..a7e3ee5466 100755 --- a/build/run-build-docker-jobs-image.sh +++ b/build/run-build-docker-jobs-image.sh @@ -135,40 +135,51 @@ timer_reset cd "$WORKSPACE" if [[ -z "$ARVADOS_BUILDING_VERSION" ]] && ! [[ -z "$version_tag" ]]; then - ARVADOS_BUILDING_VERSION="$version_tag" - ARVADOS_BUILDING_ITERATION="1" + export ARVADOS_BUILDING_VERSION="$version_tag" + export ARVADOS_BUILDING_ITERATION="1" fi +# This defines python_sdk_version and cwl_runner_version with python-style +# package suffixes (.dev/rc) calculate_python_sdk_cwl_package_versions +if [[ -z "$cwl_runner_version" ]]; then + echo "ERROR: cwl_runner_version is empty"; + exit 1 +fi + echo cwl_runner_version $cwl_runner_version python_sdk_version $python_sdk_version +# For development and release candidate packages, the OS package has a "~dev" +# or "~rc" suffix, but Python requires a ".dev" or "rc" suffix. +# +# Arvados-cwl-runner will be expecting the Python-compatible version string +# when it tries to pull the Docker image, so we use that to tag the Docker +# image. +# +# The --build-arg docker invocation arguments are expecting the OS package +# version. +python_sdk_version_os=$(echo -n $python_sdk_version | sed s/.dev/~dev/g | sed s/rc/~rc/g) +cwl_runner_version_os=$(echo -n $cwl_runner_version | sed s/.dev/~dev/g | sed s/rc/~rc/g) + if [[ "${python_sdk_version}" != "${ARVADOS_BUILDING_VERSION}" ]]; then - python_sdk_version="${python_sdk_version}-1" + python_sdk_version_os="${python_sdk_version_os}-1" else - python_sdk_version="${ARVADOS_BUILDING_VERSION}-${ARVADOS_BUILDING_ITERATION}" + python_sdk_version_os="${ARVADOS_BUILDING_VERSION}-${ARVADOS_BUILDING_ITERATION}" fi -# What we use to tag the Docker image. For development and release -# candidate packages, the OS package has a "~dev" or "~rc" suffix, but -# Python requires a ".dev" or "rc" suffix. Arvados-cwl-runner will be -# expecting the Python-compatible version string when it tries to pull -# the Docker image, but --build-arg is expecting the OS package -# version. -cwl_runner_version_tag=$(echo -n $cwl_runner_version | sed s/~dev/.dev/g | sed s/~rc/rc/g) - -if [[ "${cwl_runner_version}" != "${ARVADOS_BUILDING_VERSION}" ]]; then - cwl_runner_version="${cwl_runner_version}-1" +if [[ "${cwl_runner_version_os}" != "${ARVADOS_BUILDING_VERSION}" ]]; then + cwl_runner_version_os="${cwl_runner_version_os}-1" else - cwl_runner_version="${ARVADOS_BUILDING_VERSION}-${ARVADOS_BUILDING_ITERATION}" + cwl_runner_version_os="${ARVADOS_BUILDING_VERSION}-${ARVADOS_BUILDING_ITERATION}" fi cd docker/jobs docker build $NOCACHE \ - --build-arg python_sdk_version=${python_sdk_version} \ - --build-arg cwl_runner_version=${cwl_runner_version} \ + --build-arg python_sdk_version=${python_sdk_version_os} \ + --build-arg cwl_runner_version=${cwl_runner_version_os} \ --build-arg repo_version=${REPO} \ - -t arvados/jobs:$cwl_runner_version_tag . + -t arvados/jobs:$cwl_runner_version . ECODE=$? @@ -202,7 +213,7 @@ else ## 20150526 nico -- *sometimes* dockerhub needs re-login ## even though credentials are already in .dockercfg docker login -u arvados - docker_push arvados/jobs:$cwl_runner_version_tag + docker_push arvados/jobs:$cwl_runner_version title "upload arvados images finished (`timer`)" else title "upload arvados images SKIPPED because no --upload option set (`timer`)"