You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Verify staging repository before destructive Nexus actions
Before publish-release.sh promotes a staging repo to Maven Central
and before cancel-rc.sh drops one, perform a four-layer check on the
provided staging_repo_id:
1. Profile == org.apache.parquet (catches wrong-project IDs)
2. State == closed (catches already-released, already-dropped, never-closed)
3. Artifact present: parquet-common-<version>.pom in the repo
(catches wrong-version IDs and empty repos)
4. Description contains "Apache Parquet <version> RC<rc>"
(catches wrong-RC of the same version line)
The first three are unambiguous facts about the repo and hard-fail
the script. The description is a free-text field editable in the
Nexus UI, so a mismatch hard-fails by default but can be bypassed
with --allow-description-mismatch (also exposed as a workflow input)
for recovery scenarios.
This closes a gap that exists in both Polaris's and the original
Parquet manual procedure: "type the staging repo ID into a form
field" replaces the Nexus-UI human eyeball check without a
verification step in between.
if [[ -z"${nexus_repo_profile}"||-z"${nexus_repo_state}" ]];then
101
+
print_error "Unable to parse staging repository metadata for ${repo_id}"
102
+
return 1
103
+
fi
104
+
105
+
return 0
106
+
}
107
+
108
+
functionnexus_check_staging_artifact {
109
+
local repo_id="$1"
110
+
local version="$2"
111
+
local artifact_url="${NEXUS_CONTENT_BASE_URL}/${repo_id}/${NEXUS_VERIFY_GROUP_PATH}/${NEXUS_VERIFY_ARTIFACT_ID}/${version}/${NEXUS_VERIFY_ARTIFACT_ID}-${version}.pom"
112
+
113
+
if [[ ${DRY_RUN:-1}-eq 1 ]];then
114
+
print_command "Dry-run, WOULD HEAD ${artifact_url}"
0 commit comments