Skip to content

Commit a210187

Browse files
authored
Bugfix on snapshot upload (#1259)
1 parent 9acb872 commit a210187

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.github/publish-utils.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,11 @@ publish_snapshots_and_update_metadata() {
226226
local current_version="$1"
227227
local commit_id="$2"
228228

229-
# Get credentials to upload files directly
230-
export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
231-
export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
229+
# Credentials are already loaded from 1Password via environment variables
230+
# SONATYPE_USERNAME and SONATYPE_PASSWORD are set by the GitHub Actions workflow
232231
echo "::add-mask::$SONATYPE_USERNAME"
233232
echo "::add-mask::$SONATYPE_PASSWORD"
234-
export SNAPSHOT_REPO_URL="https://aws.oss.sonatype.org/content/repositories/snapshots/"
233+
export SNAPSHOT_REPO_URL="https://central.sonatype.com/repository/maven-snapshots/"
235234

236235
# Make a temp directory for publish-snapshot.sh
237236
mkdir -p build/resources/publish/

project/GrammarDownload.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ object GrammarDownload {
1818

1919
// Add resolver for grammar downloads
2020
val grammarResolvers: Seq[MavenRepository] = Seq(
21-
"AWS OSS Sonatype Snapshots" at "https://aws.oss.sonatype.org/content/repositories/snapshots"
21+
"AWS OSS Sonatype Snapshots" at "https://central.sonatype.com/repository/maven-snapshots"
2222
)
2323

2424
// Helper to find latest snapshot version and construct proper URL
2525
def findLatestSnapshotArtifactInfo(artifactId: String, version: String): (String, String) = {
26-
val metadataUrl = s"https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/$artifactId/$version/maven-metadata.xml"
26+
val metadataUrl = s"https://central.sonatype.com/repository/maven-snapshots/org/opensearch/$artifactId/$version/maven-metadata.xml"
2727

2828
try {
2929
val metadata = XML.load(new URL(metadataUrl))
@@ -115,7 +115,7 @@ object GrammarDownload {
115115
log.info(s"Found latest snapshot version: $snapshotVersion")
116116

117117
// Download zip file
118-
val zipUrl = s"https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/$artifactId/$version/$artifactId-$snapshotVersion.zip"
118+
val zipUrl = s"https://central.sonatype.com/repository/maven-snapshots/org/opensearch/$artifactId/$version/$artifactId-$snapshotVersion.zip"
119119
val zipFile = tempDir / s"$artifactId-$snapshotVersion.zip"
120120
log.info(s"Downloading grammar from $zipUrl")
121121
downloadFile(zipUrl, zipFile)

0 commit comments

Comments
 (0)