Merge "Add 6Wind quagga to ubuntu16.04 and centos7 images"
[releng/builder.git] / jjb / autorelease / include-raw-autorelease-get-integration-test-variables.sh
index b50f56b20de4f8051dd25d5f00bc0b8cb933353d..941106e5a8a507a2d06b977dc8bfff0b2b16029a 100644 (file)
 NEXUS_STAGING_URL=${ODLNEXUS_STAGING_URL:-$ODLNEXUSPROXY}
 
 NEXUSURL=${NEXUS_STAGING_URL}/content/repositories/
-VERSION=`grep -m2 '<version>' ${WORKSPACE}/integration/distribution/distribution-karaf/pom.xml | tail -n1 | awk -F'[<|>]' '/version/ { printf $3 }'`
+VERSION=$(grep -m2 '<version>' "${WORKSPACE}/integration/distribution/${KARAF_ARTIFACT}/pom.xml" | tail -n1 | awk -F'[<|>]' '/version/ { printf $3 }')
 echo "VERSION: ${VERSION}"
-STAGING_REPO_ID=`grep "Created staging repository with ID" $WORKSPACE/deploy-staged-repository.log | cut -d '"' -f2`
-BUNDLEURL=${NEXUSURL}/${STAGING_REPO_ID}/org/opendaylight/integration/distribution-karaf/${VERSION}/distribution-karaf-${VERSION}.zip
-echo STAGING_REPO_ID=$STAGING_REPO_ID >> $WORKSPACE/variables.prop
-echo BUNDLEURL=$BUNDLEURL >> $WORKSPACE/variables.prop
-echo "BUNDLEURL: ${BUNDLEURL}"
+STAGING_REPO_ID=$(grep "Created staging repository with ID" "$WORKSPACE/deploy-staged-repository.log" | cut -d '"' -f2)
+BUNDLE_URL="${NEXUSURL}/${STAGING_REPO_ID}/org/opendaylight/integration/${KARAF_ARTIFACT}/${VERSION}/${KARAF_ARTIFACT}-${VERSION}.zip"
+echo STAGING_REPO_ID="$STAGING_REPO_ID" >> "$WORKSPACE/variables.prop"
+echo BUNDLE_URL="$BUNDLE_URL" >> "$WORKSPACE/variables.prop"
+echo KARAF_VERSION="$KARAF_VERSION" >> "$WORKSPACE/variables.prop"
+echo "BUNDLE_URL: ${BUNDLE_URL}"
 
 # Copy variables.prop to variables.jenkins-trigger so that the end of build
 # trigger can pick up the file as input for triggering downstream jobs.