File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed
Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -894,23 +894,31 @@ verify_maven_central_deployment:
894894 script :
895895 - |
896896 export VERSION=${CI_COMMIT_TAG##v}
897- MAVEN_URL="https://repo1.maven.org/maven2/com/datadoghq/dd-java-agent/${VERSION}/dd-java-agent-${VERSION}.jar"
898- echo "Checking URL: $MAVEN_URL"
899- # Wait 30 min for the release to be available
897+ ARTIFACT_URLS=(
898+ "https://repo1.maven.org/maven2/com/datadoghq/dd-java-agent/${VERSION}/dd-java-agent-${VERSION}.jar"
899+ "https://repo1.maven.org/maven2/com/datadoghq/dd-trace-api/${VERSION}/dd-trace-api-${VERSION}.jar"
900+ "https://repo1.maven.org/maven2/com/datadoghq/dd-trace-ot/${VERSION}/dd-trace-ot-${VERSION}.jar"
901+ )
902+ # Try every min for 30 mins to see if the release artifacts are available
900903 TRY=0
901- MAX_TRIES=2
902- DELAY=30
904+ MAX_TRIES=30
905+ DELAY=60
903906 while [ $TRY -lt $MAX_TRIES ]; do
904- if curl -s -I "$MAVEN_URL" | grep -q "^HTTP/.* 200"; then
907+ ARTIFACTS_AVAILABLE=true
908+ for URL in "${ARTIFACT_URLS[@]}"; do
909+ if ! curl --location --fail --silent --show-error -I "$URL"; then
910+ ARTIFACTS_AVAILABLE=false
911+ break
912+ fi
913+ done
914+ if [ "$ARTIFACTS_AVAILABLE" = true ]; then
905915 break
906916 fi
907917 sleep $DELAY
908918 TRY=$((TRY + 1))
909- if [ $TRY -eq $MAX_TRIES ]; then
910- echo "The release was not available after 30 mins. Manually re-run the job to try again."
911- exit 1
912- fi
913919 done
920+ echo "The release was not available after 30 mins. Manually re-run the job to try again."
921+ exit 1
914922
915923publishing-gate :
916924 needs :
You can’t perform that action at this time.
0 commit comments