X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d859cab46630d46aa1ae7b1d8de7ec92d0a4b8fa..32b8eda74f24d1df963a18da5f8023b15d209ca9:/build/run-build-packages-one-target.sh diff --git a/build/run-build-packages-one-target.sh b/build/run-build-packages-one-target.sh index 0db305114e..c981b2a9ef 100755 --- a/build/run-build-packages-one-target.sh +++ b/build/run-build-packages-one-target.sh @@ -21,6 +21,10 @@ Syntax: Build only a specific package --only-test Test only a specific package +--build-version + Version to build (default: + \$ARVADOS_BUILDING_VERSION-\$ARVADOS_BUILDING_ITERATION or + 0.1.timestamp.commithash) WORKSPACE=path Path to the Arvados source tree to build packages from @@ -45,7 +49,7 @@ if ! [[ -d "$WORKSPACE" ]]; then fi PARSEDOPTS=$(getopt --name "$0" --longoptions \ - help,debug,test-packages,target:,command:,only-test:,only-build: \ + help,debug,test-packages,target:,command:,only-test:,only-build:,build-version: \ -- "" "$@") if [ $? -ne 0 ]; then exit 1 @@ -83,6 +87,18 @@ while [ $# -gt 0 ]; do --test-packages) test_packages=1 ;; + --build-version) + if [[ -z "$2" ]]; then + : + elif ! [[ "$2" =~ (.*)-(.*) ]]; then + echo >&2 "FATAL: --build-version '$2' does not include an iteration. Try '${2}-1'?" + exit 1 + else + ARVADOS_BUILDING_VERSION="${BASH_REMATCH[1]}" + ARVADOS_BUILDING_ITERATION="${BASH_REMATCH[2]}" + fi + shift + ;; --) if [ $# -gt 1 ]; then echo >&2 "$0: unrecognized argument '$2'. Try: $0 --help" @@ -95,6 +111,10 @@ done set -e +if [[ -n "$ARVADOS_BUILDING_VERSION" ]]; then + echo "build version='$ARVADOS_BUILDING_VERSION', package iteration='$ARVADOS_BUILDING_ITERATION'" +fi + if [[ -n "$test_packages" ]]; then if [[ -n "$(find $WORKSPACE/packages/$TARGET -name '*.rpm')" ]] ; then set +e @@ -141,6 +161,7 @@ popd if test -z "$packages" ; then packages="arvados-api-server + arvados-client arvados-docker-cleaner arvados-git-httpd arvados-node-manager @@ -156,14 +177,10 @@ if test -z "$packages" ; then keep-rsync keepstore keep-web - libarvados-perl" - - case "$TARGET" in - *) - packages="$packages python-arvados-fuse - python-arvados-python-client python-arvados-cwl-runner" - ;; - esac + libarvados-perl + python-arvados-fuse + python-arvados-python-client + python-arvados-cwl-runner" fi FINAL_EXITCODE=0 @@ -216,6 +233,8 @@ else # Build packages if docker run --rm \ "${docker_volume_args[@]}" \ + --env ARVADOS_BUILDING_VERSION="$ARVADOS_BUILDING_VERSION" \ + --env ARVADOS_BUILDING_ITERATION="$ARVADOS_BUILDING_ITERATION" \ --env ARVADOS_DEBUG=$ARVADOS_DEBUG \ --env "ONLY_BUILD=$ONLY_BUILD" \ "$IMAGE" $COMMAND