Remove extra space between feature repos 53/74753/5
authorLuis Gomez <ecelgp@gmail.com>
Thu, 2 Aug 2018 04:06:08 +0000 (21:06 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Thu, 2 Aug 2018 07:44:40 +0000 (00:44 -0700)
This produces a sed error when job is triggered by another job.
Also fix yaml file indentation.

Change-Id: I4e852f6ed28158b767bb51da095b66e803cd42ce
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
jjb/integration/distribution/distribution-check-bootup.sh

index 1285ce62235902203a34573669e437fec57800d0..2ff7cdf314a1425b126dc228540a096d8471da8b 100644 (file)
@@ -31,11 +31,15 @@ fi
 sed -ie "s%\(featuresRepositories= \|featuresRepositories = \)%featuresRepositories = mvn:org.opendaylight.integration/${FEATURE_TEST_STRING}/${BUNDLE_VERSION}/xml/features,%g" ${FEATURESCONF}
 
 if [[ ! -z "${REPO_URL}" ]]; then
-   sed -ie "s%featuresRepositories = %featuresRepositories = ${REPO_URL},%g" ${FEATURESCONF}
+   # sed below will fail if it finds space between feature repos.
+   REPO_URL_NO_SPACE="$(echo -e "${REPO_URL}" | tr -d '[:space:]')"
+   sed -ie "s%featuresRepositories = %featuresRepositories = ${REPO_URL_NO_SPACE},%g" ${FEATURESCONF}
 fi
 
 # Add actual boot features.
-sed -ie "s/\(featuresBoot= \|featuresBoot = \)/featuresBoot = ${ACTUALFEATURES},/g" "${FEATURESCONF}"
+# sed below will fail if it finds space between feature repos.
+FEATURES_NO_SPACE="$(echo -e "${ACTUALFEATURES}" | tr -d '[:space:]')"
+sed -ie "s/\(featuresBoot= \|featuresBoot = \)/featuresBoot = ${FEATURES_NO_SPACE},/g" "${FEATURESCONF}"
 cat "${FEATURESCONF}"
 
 echo "Configuring the log..."