Skip to content

Commit 047df04

Browse files
ci: wait for Java SDK publish
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
1 parent 4fe3a7d commit 047df04

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

.woodpecker/release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ steps:
2626
CENTRAL_PASSWORD:
2727
from_secret: "central password"
2828
commands:
29-
- apt-get update -qq && apt-get install -y -qq gnupg
29+
- apt-get update -qq && apt-get install -y -qq curl gnupg
3030
- |
3131
key_file="$(mktemp)"
3232
printf '%s' "$MAVEN_GPG_PRIVATE_KEY" | sed 's/\\n/\n/g' > "$key_file"
@@ -53,3 +53,16 @@ steps:
5353
- echo "Releasing version $VERSION"
5454
- mvn -B versions:set -DnewVersion="$VERSION" -DprocessAllModules=true -DgenerateBackupPoms=false
5555
- mvn -B -P release clean deploy -DskipTests -Dgpg.keyname="$GPG_KEY_ID" -Dgpg.passphrase="$MAVEN_GPG_PASSPHRASE" -Dgpg.useagent=false
56+
- |
57+
artifact_url="https://repo.maven.apache.org/maven2/io/keploy/keploy-sdk/${VERSION}/keploy-sdk-${VERSION}.jar"
58+
echo "Waiting for $artifact_url"
59+
for attempt in $(seq 1 60); do
60+
if curl -fsI "$artifact_url" >/dev/null; then
61+
echo "Released artifact is available on Maven Central"
62+
exit 0
63+
fi
64+
echo "Artifact not available yet, retrying in 30s ($attempt/60)"
65+
sleep 30
66+
done
67+
echo "Released artifact is not available on Maven Central after 30 minutes"
68+
exit 1

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
<configuration>
109109
<publishingServerId>central</publishingServerId>
110110
<autoPublish>true</autoPublish>
111-
<waitUntil>validated</waitUntil>
111+
<waitUntil>published</waitUntil>
112112
</configuration>
113113
</plugin>
114114
</plugins>

0 commit comments

Comments
 (0)