We have run into a case where the repo on ODL
was good, and the repo on nexus was failed.
Cover this case by running the loop twice.
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I995a34918481db9e41d5486c06995f57100c1199
--- /dev/null
+---
+fixes:
+ - |
+ Verify both repos before attempting release.
+ We have run into a case where the repo on ODL
+ nexus was good, and the repo on Sonatype nexus
+ was missing. Cover this case by running the verify
+ loop over each repo before attempting release.
lftools nexus release -v --server https://"$NEXUS_URL" "$STAGING_REPO"
echo "Merge will run"
echo "lftools nexus release --server https://$NEXUS_URL $STAGING_REPO"
- if [[ "$JOB_NAME" =~ "merge" ]]; then
+ done
+ #Run the loop twice, to catch errors on either nexus repo
+
+ if [[ "$JOB_NAME" =~ "merge" ]]; then
+ for staging_url in $(zcat "$PATCH_DIR"/staging-repo.txt.gz | awk -e '{print $2}'); do
+ NEXUS_URL=$(echo "$staging_url" | sed -e 's|^[^/]*//||' -e 's|/.*$||')
+ STAGING_REPO=${staging_url#*repositories/}
echo "Promoting $STAGING_REPO on $NEXUS_URL."
lftools nexus release --server https://"$NEXUS_URL" "$STAGING_REPO"
- fi
- done
+ done
+ fi
}