echo >&2 " -u, --upload Upload the images (docker push)"
echo >&2 " --no-cache Don't use build cache"
echo >&2 " -h, --help Display this help and exit"
echo >&2
echo >&2 " If no options are given, just builds the images."
}
echo >&2 " -u, --upload Upload the images (docker push)"
echo >&2 " --no-cache Don't use build cache"
echo >&2 " -h, --help Display this help and exit"
echo >&2
echo >&2 " If no options are given, just builds the images."
}
python_sdk_ts=$(cd sdk/python && timestamp_from_git)
cwl_runner_ts=$(cd sdk/cwl && timestamp_from_git)
python_sdk_ts=$(cd sdk/python && timestamp_from_git)
cwl_runner_ts=$(cd sdk/cwl && timestamp_from_git)
-python_sdk_version=$(cd sdk/python && nohash_version_from_git 0.1)-2
-cwl_runner_version=$(cd sdk/cwl && nohash_version_from_git 1.0)-3
+python_sdk_version=$(cd sdk/python && nohash_version_from_git 0.1)
+cwl_runner_version=$(cd sdk/cwl && nohash_version_from_git 1.0)
- cwl_runner_version=$python_sdk_version
- gittag=$(cd sdk/python && git log --first-parent --max-count=1 --format=format:%H)
-else
- gittag=$(cd sdk/cwl && git log --first-parent --max-count=1 --format=format:%H)
+ cwl_runner_version=$(cd sdk/python && nohash_version_from_git 1.0)
- --build-arg python_sdk_version=$python_sdk_version \
- --build-arg cwl_runner_version=$cwl_runner_version \
- -t arvados/jobs:$gittag .
+ --build-arg python_sdk_version=${python_sdk_version}-2 \
+ --build-arg cwl_runner_version=${cwl_runner_version}-3 \
+ -t arvados/jobs:$cwl_runner_version .
-
-docker tag $FORCE arvados/jobs:$gittag arvados/jobs:latest
+if ! [[ -z "$version_tag" ]]; then
+ docker tag $FORCE arvados/jobs:$cwl_runner_version arvados/jobs:"$version_tag"
+else
+ docker tag $FORCE arvados/jobs:$cwl_runner_version arvados/jobs:latest
+fi
## 20150526 nico -- *sometimes* dockerhub needs re-login
## even though credentials are already in .dockercfg
docker login -u arvados
## 20150526 nico -- *sometimes* dockerhub needs re-login
## even though credentials are already in .dockercfg
docker login -u arvados
-
- docker_push arvados/jobs:$gittag
- docker_push arvados/jobs:latest
+ if ! [[ -z "$version_tag" ]]; then
+ docker_push arvados/jobs:"$version_tag"
+ else
+ docker_push arvados/jobs:$cwl_runner_version
+ docker_push arvados/jobs:latest
+ fi
title "upload arvados images finished (`timer`)"
else
title "upload arvados images SKIPPED because no --upload option set (`timer`)"
title "upload arvados images finished (`timer`)"
else
title "upload arvados images SKIPPED because no --upload option set (`timer`)"