The patch Ib9066f85ff135bbba88410e8e2efb5345311c414 broke the post
build scripts from properly getting the staging repo ID.
The lf-maven-stage macro produces a parsed file staging-repo.txt
which contains the repo already and we no longer need to parse the
full Maven log to find this detail.
Change-Id: Id5ce6b416f6e2002bf5b204ca3f1843f6c76d51c
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
NEXUSURL="${NEXUS_STAGING_URL}/content/repositories/"
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)
+STAGING_REPO_ID=$(grep "$NEXUS_STAGING_URL" "$WORKSPACE/archives/staging-repo.txt" | awk '{print $1}')
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"