fix hc2vpp release branch builds 72/19372/2
authorMichal Cmarada <mcmarada@cisco.com>
Mon, 6 May 2019 12:33:11 +0000 (14:33 +0200)
committerMichal Cmarada <mcmarada@cisco.com>
Mon, 6 May 2019 12:50:17 +0000 (12:50 +0000)
When release version of HC2VPP is being build,
we need to download release version of JVPP package
to install correct JVPP artifacts.

Change-Id: I922aaccb829fc4afc8bbd797aedd62f368d34c34
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
jjb/hc2vpp/include-raw-hc2vpp-integration-prebuild.sh

index 1e54750..dc4ca43 100644 (file)
@@ -21,6 +21,14 @@ echo DISTRIB_RELEASE: ${DISTRIB_RELEASE}
 echo DISTRIB_CODENAME: ${DISTRIB_CODENAME}
 echo DISTRIB_DESCRIPTION: ${DISTRIB_DESCRIPTION}
 
+if [[ "$VERSION" == *"-release" ]]; then
+    # at the time when HC2VPP release packages are being build,
+    # jvpp release packages are already promoted to release repository.
+    # Therefore we need to switch to release repository in order to download
+    # correct jvpp package versions
+    STREAM="release"
+fi
+
 echo "----- DOWNLOADING PACKAGES -----"
 if ! [[ -z ${REPO_NAME} ]]; then
     REPO_URL="https://packagecloud.io/fdio/${STREAM}"
@@ -30,6 +38,10 @@ if ! [[ -z ${REPO_NAME} ]]; then
             echo "Deleting: /etc/apt/sources.list.d/99fd.io.list"
             sudo rm /etc/apt/sources.list.d/99fd.io.list
         fi
+        if ! [[ "${STREAM}" == "master" ]]; then
+            echo "stable branch - clearing all fdio repos. new one will be installed."
+            sudo rm  -f /etc/apt/sources.list.d/fdio_*.list
+        fi
         curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.deb.sh | sudo bash
         if [[ "${VERSION}" != 'RELEASE' ]]; then
             # download specific version if set