Remove old /p/ in gerrit HTTP URL
[releng/builder.git] / jjb / integration / multipatch-distribution.sh
index d02a42421a0cd204232277968b39018aaba4c8a4..58454878ab7aef74f69730431a028f35dc20fe15 100755 (executable)
@@ -37,11 +37,6 @@ if [ -n "$GERRIT_EVENT_COMMENT_TEXT" ]; then
     fi
     PATCHES_TO_BUILD=${PATCHES_TO_BUILD#*:}
 fi
-if ${BUILD_FAST}; then
-    fast_option="-Pq"
-else
-    fast_option=""
-fi
 # check if topic exists:
 # if topic=binding-rpc, then checkout first patch in binding-rpc topic (if it exists)
 # if topic:binding-rpc, then cherry-pick first patch in binding-rpc topic (if it exists)
@@ -137,7 +132,7 @@ do
     PROJECT_SHORTNAME="${PROJECT##*/}"  # http://stackoverflow.com/a/3162500
     PROJECTS+=("${PROJECT_SHORTNAME}")
     echo "1. cloning project ${PROJECT}"
-    git clone "https://git.opendaylight.org/gerrit/p/${PROJECT}"
+    git clone "https://git.opendaylight.org/gerrit/${PROJECT}"
     cd ${PROJECT_SHORTNAME}
     # For patch = controller=61/29761/5:45/29645/6, this gives 61/29761/5.
     CHECKOUT="$(echo ${patch} | cut -d\= -s -f 2 | cut -d\: -f 1)"
@@ -196,7 +191,7 @@ if [ "${distribution_status}" == "not_included" ]; then
     echo "adding integration/distribution"
     PROJECTS+=(distribution)
     # clone distribution and add it as a module in root pom
-    git clone "https://git.opendaylight.org/gerrit/p/integration/distribution"
+    git clone "https://git.opendaylight.org/gerrit/integration/distribution"
     cd distribution
     git checkout "${DISTRIBUTION_BRANCH_TO_BUILD}"
     cd "${BUILD_DIR}"
@@ -205,6 +200,12 @@ fi
 # Second phase: build everything
 
 for PROJECT_SHORTNAME in "${PROJECTS[@]}"; do
+    # Set Fast build if project is not in BUILD_NORMAL and BUILD_FAST is true
+    if [[ "${BUILD_NORMAL}" != *"${PROJECT_SHORTNAME}"* ]] && ${BUILD_FAST}; then
+        fast_option="-Pq"
+    else
+        fast_option=""
+    fi
     pushd "${PROJECT_SHORTNAME}"
     # Build project
     "$MVN" clean install \