Merge changes I403443f2,I6da43d3d,Iac41cc91
[releng/builder.git] / jjb / integration / multipatch-distribution.sh
index eb61446ec9a3e4829ceff6dd1a7a36c7ecf6e250..82220dff32a0f00ae3a6737828296febf4a7a15a 100755 (executable)
@@ -43,6 +43,7 @@ if [[ "${PATCHES_TO_BUILD}" == *topic* ]]; then
     echo "Create topic ${TOPIC} patch list"
     PATCHES_TO_BUILD=""
     read -ra PROJECT_LIST <<< "${BUILD_ORDER}"
+    echo "List of projects to check patch in topic: ${PROJECT_LIST[*]}"
     for PROJECT in "${PROJECT_LIST[@]}"; do
         # get all patches number for a topic for a given project
         IFS=$'\n' read -rd '' -a GERRIT_PATCH_LIST <<< "$(ssh -p 29418 jenkins-$SILO@git.opendaylight.org gerrit query status:open topic:${TOPIC} project:${PROJECT} \
@@ -71,12 +72,16 @@ if [[ "${PATCHES_TO_BUILD}" == *topic* ]]; then
             read -rd '' -a SORT_REF_LIST <<< "${SORT_REF[*]}" || true
             # add refspec to patches to build list
             for PATCH in "${SORT_REF_LIST[@]}"; do
-                PATCHES_TO_BUILD="${PATCHES_TO_BUILD}:${PATCH/*-/}"
+                # if project is odlparent or yangtools, do not cherry-pick
+                if [[ "${PROJECT}" == "odlparent" || "${PROJECT}" == "yangtools" ]]; then
+                    PATCHES_TO_BUILD="${PATCHES_TO_BUILD}=${PATCH/*-/}"
+                else
+                    PATCHES_TO_BUILD="${PATCHES_TO_BUILD}:${PATCH/*-/}"
+                fi
             done
         fi
     done
 fi
-
 echo "Patches to build: ${PATCHES_TO_BUILD}"
 IFS=',' read -ra PATCHES <<< "${PATCHES_TO_BUILD}"