Fix: Set the correct features-test version 36/99836/2
authorSangwook Ha <sangwook.ha@verizon.com>
Mon, 21 Feb 2022 20:31:02 +0000 (12:31 -0800)
committerSangwook Ha <sangwook.ha@verizon.com>
Mon, 21 Feb 2022 22:17:54 +0000 (14:17 -0800)
The project version of opendaylight distribution does not match
the version of features-test (e.g. 15.3.0-SNAPSHOT for opendaylight
vs. 0.15.3-SNAPSHOT for features-test). So the features-test version
should be updated when KARAF_ARTIFACT is opendaylight.

Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Change-Id: Ie67383cdbc0bcfd0f7e939f87f029b037f30f71d

jjb/integration/common-functions.sh
jjb/integration/distribution/distribution-check-bootup.sh

index 85c16ee197f12596fa2a3db1e9ffe3804a4fbcee..801aa9c84ce44c7de20d713c4e62e4bd876a6fdc 100644 (file)
@@ -915,11 +915,15 @@ if [[ "$USEFEATURESBOOT" == "True" ]]; then
 fi
 
 FEATURE_TEST_STRING="features-test"
+FEATURE_TEST_VERSION="$BUNDLE_VERSION"
+if [[ "$KARAF_ARTIFACT" == "opendaylight" ]]; then
+    FEATURE_TEST_VERSION="$(sed -r "s%^([0-9]+)\.([0-9]+)\.0(.*)%0.\1.\2\3%" <<<"$BUNDLE_VERSION")"
+fi
 KARAF_VERSION=${KARAF_VERSION:-karaf4}
 
 # only manipulate feature repo in integration distro
 if [[ "$KARAF_PROJECT" == "integration" ]]; then
-       sed -ie "s%\\(featuresRepositories=\\|featuresRepositories =\\)%featuresRepositories = mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLE_VERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.2.0/xml/features,%g" ${FEATURESCONF}
+       sed -ie "s%\\(featuresRepositories=\\|featuresRepositories =\\)%featuresRepositories = mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/\${FEATURE_TEST_VERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.2.0/xml/features,%g" ${FEATURESCONF}
        if [[ ! -z "${REPO_URL}" ]]; then
           sed -ie "s%featuresRepositories =%featuresRepositories = ${REPO_URL},%g" ${FEATURESCONF}
        fi
index 2ed4fa1d8b193e81fc89119026e801a2fd0e1376..a02b91bf58a328fa68a9b4dc04647fdb182e8a76 100644 (file)
@@ -36,11 +36,15 @@ unzip -q "${BUNDLE}"
 echo "Configuring the startup features..."
 FEATURESCONF="${WORKSPACE}/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg"
 FEATURE_TEST_STRING="features-test"
+FEATURE_TEST_VERSION="$BUNDLE_VERSION"
+if [[ "$KARAF_ARTIFACT" == "opendaylight" ]]; then
+    FEATURE_TEST_VERSION="$(sed -r "s%^([0-9]+)\.([0-9]+)\.0(.*)%0.\1.\2\3%" <<<"$BUNDLE_VERSION")"
+fi
 
 # only replace feature repo in integration/distro, MRI projects need to pull in
 # the features they need by themselves
 if [[ "$KARAF_PROJECT" == integration ]]; then
-    sed -ie "s%\(featuresRepositories= \|featuresRepositories = \)%featuresRepositories = mvn:org.opendaylight.integration/${FEATURE_TEST_STRING}//xml/features,%g" "${FEATURESCONF}"
+    sed -ie "s%\(featuresRepositories= \|featuresRepositories = \)%featuresRepositories = mvn:org.opendaylight.integration/${FEATURE_TEST_STRING}/${FEATURE_TEST_VERSION}/xml/features,%g" "${FEATURESCONF}"
 
     if [[ -n "${REPO_URL}" ]]; then
        # sed below will fail if it finds space between feature repos.