Add step to verify stage repo is closed 51/62051/1
authorAnil Belur <abelur@linuxfoundation.org>
Sat, 19 Oct 2019 11:35:14 +0000 (17:05 +0530)
committerAnil Belur <abelur@linuxfoundation.org>
Sat, 19 Oct 2019 11:42:18 +0000 (17:12 +0530)
Add step to verify Nexus staging repository is closed correctly or
fail the staging job, if the repository is still open. This allows
projects to address the validation failures earlier during
maven-stage phase, instead of waiting to catch them while running
the self-release job.

Issue: IT-17976
Change-Id: I88ca6cce67e2400ab1d24fd3cbac419bb8b3eb91
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
releasenotes/notes/verify-staging-repo-92ae65287c42d2d2.yaml [new file with mode: 0644]
shell/maven-stage.sh

diff --git a/releasenotes/notes/verify-staging-repo-92ae65287c42d2d2.yaml b/releasenotes/notes/verify-staging-repo-92ae65287c42d2d2.yaml
new file mode 100644 (file)
index 0000000..cc2a8be
--- /dev/null
@@ -0,0 +1,7 @@
+---
+fixes:
+  - |
+    Add step to verify Nexus staging repository is closed correctly or
+    fail the staging job, if the repository is still open. This allows
+    projects to address the validation failures earlier during maven-stage
+    phase, instead of waiting to catch them while running the self-release job.
index fa89047..63d3f1e 100644 (file)
@@ -22,6 +22,9 @@ TMP_FILE="$(mktemp)"
 lftools deploy nexus-stage "$NEXUS_URL" "$STAGING_PROFILE_ID" "$WORKSPACE/m2repo" | tee "$TMP_FILE"
 staging_repo=$(sed -n -e 's/Staging repository \(.*\) created\./\1/p' "$TMP_FILE")
 
+echo "INFO: Verify Nexus staging repository is closed"
+lftools nexus release -v --server "$NEXUS_URL" "$staging_repo"
+
 # Store repo info to a file in archives
 mkdir -p "$WORKSPACE/archives"
 echo "$staging_repo ${NEXUS_URL}/content/repositories/$staging_repo" | tee -a "$WORKSPACE/archives/staging-repo.txt"