Set -x so that we can see where script fails
[releng/builder.git] / jjb / integration / multipatch-distribution.sh
index e7ee1deabbf1c3a451f4a95ce118dff63db574ea..fd0684cfa0895ff89284c5d64a10dc4176dbf273 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-set -e
+set -ex
 
 # create a fresh empty place to build this custom distribution
 BUILD_DIR=${WORKSPACE}/patch_tester
@@ -145,27 +145,27 @@ do
         git checkout FETCH_HEAD
         # If the patch is for MRI project, adjust the MRI versions
         # shellcheck disable=SC2235
-        if [ "${PROJECT}" == "odlparent" ] || [ "${PROJECT}" == "yangtools" ] || [ "${PROJECT}" == "mdsal" ] || ([ "${PROJECT}" == "controller" ] && [ "${DISTROSTREAM}" != "magnesium" ]); then
+        if [ "${PROJECT}" == "odlparent" ] || [ "${PROJECT}" == "yangtools" ] || [ "${PROJECT}" == "mdsal" ] || ([ "${PROJECT}" == "controller" ] && [ "${DISTROSTREAM}" != "magnesium" ] && [ "${DISTROSTREAM}" != "sodium" ]); then
             ODLPARENT_VERSION="$(xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -v //x:odlparent.version ../pom.xml)"
             echo "change odlparent version to ${ODLPARENT_VERSION}"
             find . -name "pom.xml" -print0 | xargs -0 xmlstarlet ed --inplace -P -N x=http://maven.apache.org/POM/4.0.0 -u //x:version\[../x:parent/x:groupId=\"org.opendaylight.odlparent\"\] -v "${ODLPARENT_VERSION}"
             find . -name "pom.xml" -print0 | xargs -0 xmlstarlet ed --inplace -P -N x=http://maven.apache.org/POM/4.0.0 -u //x:version\[../x:groupId=\"org.opendaylight.odlparent\"\] -v "${ODLPARENT_VERSION}"
         fi
         # shellcheck disable=SC2235
-        if [ "${PROJECT}" == "yangtools" ] || [ "${PROJECT}" == "mdsal" ] || ([ "${PROJECT}" == "controller" ] && [ "${DISTROSTREAM}" != "magnesium" ]); then
+        if [ "${PROJECT}" == "yangtools" ] || [ "${PROJECT}" == "mdsal" ] || ([ "${PROJECT}" == "controller" ] && [ "${DISTROSTREAM}" != "magnesium" ] && [ "${DISTROSTREAM}" != "sodium" ]); then
             YANGTOOLS_VERSION="$(xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -v //x:yangtools.version ../pom.xml)"
             echo "change yangtools version to ${YANGTOOLS_VERSION}"
             find . -name "pom.xml" -print0 | xargs -0 xmlstarlet ed --inplace -P -N x=http://maven.apache.org/POM/4.0.0 -u //x:version\[../x:parent/x:groupId=\"org.opendaylight.yangtools\"\] -v "${YANGTOOLS_VERSION}"
             find . -name "pom.xml" -print0 | xargs -0 xmlstarlet ed --inplace -P -N x=http://maven.apache.org/POM/4.0.0 -u //x:version\[../x:groupId=\"org.opendaylight.yangtools\"\] -v "${YANGTOOLS_VERSION}"
         fi
        # shellcheck disable=SC2235
-       if [ "${PROJECT}" == "mdsal" ] || ([ "${PROJECT}" == "controller" ] && [ "${DISTROSTREAM}" != "magnesium" ]); then
+        if [ "${PROJECT}" == "mdsal" ] || ([ "${PROJECT}" == "controller" ] && [ "${DISTROSTREAM}" != "magnesium" ] && [ "${DISTROSTREAM}" != "sodium" ]); then
             MDSAL_VERSION="$(xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -v //x:mdsal.version ../pom.xml)"
             echo "change mdsal version to ${MDSAL_VERSION}"
             find . -name "pom.xml" -print0 | xargs -0 xmlstarlet ed --inplace -P -N x=http://maven.apache.org/POM/4.0.0 -u //x:version\[../x:parent/x:groupId=\"org.opendaylight.mdsal\"\] -v "${MDSAL_VERSION}"
             find . -name "pom.xml" -print0 | xargs -0 xmlstarlet ed --inplace -P -N x=http://maven.apache.org/POM/4.0.0 -u //x:version\[../x:groupId=\"org.opendaylight.mdsal\"\] -v "${MDSAL_VERSION}"
         fi
-        if [ "${PROJECT}" == "controller" ] && [ "${DISTROSTREAM}" != "magnesium" ]; then
+        if [ "${PROJECT}" == "controller" ] && [ "${DISTROSTREAM}" != "magnesium" ] && [ "${DISTROSTREAM}" != "sodium" ]; then
             CONTROLLER_VERSION="$(xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -v //x:controller.version ../pom.xml)"
             echo "change controller version to ${CONTROLLER_VERSION}"
             find . -name "pom.xml" -print0 | xargs -0 xmlstarlet ed --inplace -P -N x=http://maven.apache.org/POM/4.0.0 -u //x:version\[../x:parent/x:groupId=\"org.opendaylight.controller\"\] -v "${CONTROLLER_VERSION}"
@@ -174,7 +174,7 @@ do
     else
         # If project with no patch is MRI, download release tag:
         # shellcheck disable=SC2235
-        if [ "${PROJECT}" == "odlparent" ] || [ "${PROJECT}" == "yangtools" ] || [ "${PROJECT}" == "mdsal" ] || ([ "${PROJECT}" == "controller" ] && [ "${DISTROSTREAM}" != "magnesium" ]); then
+        if [ "${PROJECT}" == "odlparent" ] || [ "${PROJECT}" == "yangtools" ] || [ "${PROJECT}" == "mdsal" ] || ([ "${PROJECT}" == "controller" ] && [ "${DISTROSTREAM}" != "magnesium" ] && [ "${DISTROSTREAM}" != "sodium" ]); then
             # shellcheck disable=SC2086
             PROJECT_VERSION="$(xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -v //x:${PROJECT_SHORTNAME}.version ../pom.xml)"
             echo "2. checking out tag v${PROJECT_VERSION}"