Fix cwltest version pin, refs #20973
authorPeter Amstutz <peter.amstutz@curii.com>
Tue, 19 Sep 2023 21:24:47 +0000 (17:24 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Tue, 19 Sep 2023 21:24:47 +0000 (17:24 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

build/run-build-packages-one-target.sh
build/run-build-test-packages-one-target.sh
build/run-library.sh

index 7b51264cee80fe3703bfa8a057b41a679eb2f658..29370279c6e11f7cd8a6e75ecb67f43302ad630c 100755 (executable)
@@ -32,6 +32,8 @@ Syntax:
     Version to build (default:
     \$ARVADOS_BUILDING_VERSION-\$ARVADOS_BUILDING_ITERATION or
     0.1.timestamp.commithash)
+--skip-docker-build
+    Don't try to build Docker images
 
 WORKSPACE=path         Path to the Arvados source tree to build packages from
 
@@ -56,7 +58,7 @@ if ! [[ -d "$WORKSPACE" ]]; then
 fi
 
 PARSEDOPTS=$(getopt --name "$0" --longoptions \
-    help,debug,test-packages,target:,command:,only-test:,force-test,only-build:,force-build,arch:,build-version: \
+    help,debug,test-packages,target:,command:,only-test:,force-test,only-build:,force-build,arch:,build-version:,skip-docker-build \
     -- "" "$@")
 if [ $? -ne 0 ]; then
     exit 1
@@ -121,6 +123,9 @@ while [ $# -gt 0 ]; do
             fi
             shift
             ;;
+        --skip-docker-build)
+            SKIP_DOCKER_BUILD=1
+           ;;
         --)
             if [ $# -gt 1 ]; then
                 echo >&2 "$0: unrecognized argument '$2'. Try: $0 --help"
@@ -183,23 +188,25 @@ fi
 
 JENKINS_DIR=$(dirname "$(readlink -e "$0")")
 
-if [[ -n "$test_packages" ]]; then
-    pushd "$JENKINS_DIR/package-test-dockerfiles"
-    make "$TARGET/generated"
-else
-    pushd "$JENKINS_DIR/package-build-dockerfiles"
-    make "$TARGET/generated"
-fi
+if [[ "$SKIP_DOCKER_BUILD" != 1 ]] ; then
+    if [[ -n "$test_packages" ]]; then
+       pushd "$JENKINS_DIR/package-test-dockerfiles"
+       make "$TARGET/generated"
+    else
+       pushd "$JENKINS_DIR/package-build-dockerfiles"
+       make "$TARGET/generated"
+    fi
 
-GOVERSION=$(grep 'const goversion =' $WORKSPACE/lib/install/deps.go |awk -F'"' '{print $2}')
+    GOVERSION=$(grep 'const goversion =' $WORKSPACE/lib/install/deps.go |awk -F'"' '{print $2}')
 
-echo $TARGET
-cd $TARGET
-time docker build --tag "$IMAGE" \
-  --build-arg HOSTTYPE=$HOSTTYPE \
-  --build-arg BRANCH=$(git rev-parse --abbrev-ref HEAD) \
-  --build-arg GOVERSION=$GOVERSION --no-cache .
-popd
+    echo $TARGET
+    cd $TARGET
+    time docker build --tag "$IMAGE" \
+        --build-arg HOSTTYPE=$HOSTTYPE \
+        --build-arg BRANCH=$(git rev-parse --abbrev-ref HEAD) \
+        --build-arg GOVERSION=$GOVERSION --no-cache .
+    popd
+fi
 
 if test -z "$packages" ; then
     packages="arvados-api-server
index aa4acb6a2bf7817f933f9bdb85b74789c91b154b..9af95d13d34de9dba9658156762244e540a8a55f 100755 (executable)
@@ -31,6 +31,8 @@ Syntax:
     Version to build (default:
     \$ARVADOS_BUILDING_VERSION-\$ARVADOS_BUILDING_ITERATION or
     0.1.timestamp.commithash)
+--skip-docker-build
+    Don't try to build Docker images
 
 WORKSPACE=path         Path to the Arvados source tree to build packages from
 
@@ -53,7 +55,7 @@ if ! [[ -d "$WORKSPACE" ]]; then
 fi
 
 PARSEDOPTS=$(getopt --name "$0" --longoptions \
-    help,debug,upload,rc,target:,force-test,only-build:,force-build,arch:,build-version: \
+    help,debug,upload,rc,target:,force-test,only-build:,force-build,arch:,build-version:,skip-docker-build \
     -- "" "$@")
 if [ $? -ne 0 ]; then
     exit 1
@@ -102,6 +104,9 @@ while [ $# -gt 0 ]; do
             build_args+=("$1" "$2")
             shift
             ;;
+        --skip-docker-build)
+            SKIP_DOCKER_BUILD=1
+           ;;
         --)
             if [ $# -gt 1 ]; then
                 echo >&2 "$0: unrecognized argument '$2'. Try: $0 --help"
@@ -126,6 +131,10 @@ if [[ -n "$FORCE_TEST" ]]; then
   build_args+=(--force-test)
 fi
 
+if [[ "$SKIP_DOCKER_BUILD" = 1 ]]; then
+  build_args+=(--skip-docker-build)
+fi
+
 if [[ -n "$ARCH" ]]; then
   build_args+=(--arch "$ARCH")
 fi
index 7f2b372ceaf98a0e74a8b7267f123214e22cd9f1..ed5bcc5ab7e265187669fcb73abbb3f9ee747b76 100755 (executable)
@@ -661,7 +661,7 @@ handle_cwltest () {
   # our files are in Keep, all the tests fail.
   # We should add [optional] Arvados support to cwltest so it can access
   # Keep but for the time being just package the last working version.
-  git --git-dir=cwltest checkout 2.3.20230108193615
+  (cd cwltest && git checkout 2.3.20230108193615)
 
   # signal to our build script that we want a cwltest executable installed in /usr/bin/
   mkdir cwltest/bin && touch cwltest/bin/cwltest
@@ -799,7 +799,7 @@ fpm_build_virtualenv_worker () {
   PACKAGE_PATH=`(cd dist; ls *tar.gz)`
 
   if [[ "arvados-python-client" == "$PKG" ]]; then
-    PYSDK_PATH=`pwd`/dist/
+    PYSDK_PATH="-f $(pwd)/dist/"
   fi
 
   if [[ -n "$ONLY_BUILD" ]] && [[ "$PYTHON_PKG" != "$ONLY_BUILD" ]] && [[ "$PKG" != "$ONLY_BUILD" ]]; then
@@ -863,16 +863,16 @@ fpm_build_virtualenv_worker () {
   echo "wheel version:      `build/usr/share/$python/dist/$PYTHON_PKG/bin/wheel version`"
 
   if [[ "$TARGET" != "centos7" ]] || [[ "$PYTHON_PKG" != "python-arvados-fuse" ]]; then
-    build/usr/share/$python/dist/$PYTHON_PKG/bin/$pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG -f $PYSDK_PATH $PACKAGE_PATH
+    build/usr/share/$python/dist/$PYTHON_PKG/bin/$pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG $PYSDK_PATH $PACKAGE_PATH
   else
     # centos7 needs these special tweaks to install python-arvados-fuse
     build/usr/share/$python/dist/$PYTHON_PKG/bin/$pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG docutils
-    PYCURL_SSL_LIBRARY=nss build/usr/share/$python/dist/$PYTHON_PKG/bin/$pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG -f $PYSDK_PATH $PACKAGE_PATH
+    PYCURL_SSL_LIBRARY=nss build/usr/share/$python/dist/$PYTHON_PKG/bin/$pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG $PYSDK_PATH $PACKAGE_PATH
   fi
 
   if [[ "$?" != "0" ]]; then
     echo "Error, unable to run"
-    echo "  build/usr/share/$python/dist/$PYTHON_PKG/bin/$pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG -f $PYSDK_PATH $PACKAGE_PATH"
+    echo "  build/usr/share/$python/dist/$PYTHON_PKG/bin/$pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG $PYSDK_PATH $PACKAGE_PATH"
     exit 1
   fi