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 @@ -893,23 +893,31 @@ verify_maven_central_deployment:
893893 script :
894894 - |
895895 export VERSION=${CI_COMMIT_TAG##v}
896- MAVEN_URL="https://repo1.maven.org/maven2/com/datadoghq/dd-java-agent/${VERSION}/dd-java-agent-${VERSION}.jar"
897- echo "Checking URL: $MAVEN_URL"
898- # Wait 30 min for the release to be available
896+ ARTIFACT_URLS=(
897+ "https://repo1.maven.org/maven2/com/datadoghq/dd-java-agent/${VERSION}/dd-java-agent-${VERSION}.jar"
898+ "https://repo1.maven.org/maven2/com/datadoghq/dd-trace-api/${VERSION}/dd-trace-api-${VERSION}.jar"
899+ "https://repo1.maven.org/maven2/com/datadoghq/dd-trace-ot/${VERSION}/dd-trace-ot-${VERSION}.jar"
900+ )
901+ # Try every min for 30 mins to see if the release artifacts are available
899902 TRY=0
900- MAX_TRIES=2
901- DELAY=30
903+ MAX_TRIES=30
904+ DELAY=60
902905 while [ $TRY -lt $MAX_TRIES ]; do
903- if curl -s -I "$MAVEN_URL" | grep -q "^HTTP/.* 200"; then
906+ ARTIFACTS_AVAILABLE=true
907+ for URL in "${ARTIFACT_URLS[@]}"; do
908+ if ! curl --location --fail --silent --show-error -I "$URL"; then
909+ ARTIFACTS_AVAILABLE=false
910+ break
911+ fi
912+ done
913+ if [ "$ARTIFACTS_AVAILABLE" = true ]; then
904914 break
905915 fi
906916 sleep $DELAY
907917 TRY=$((TRY + 1))
908- if [ $TRY -eq $MAX_TRIES ]; then
909- echo "The release was not available after 30 mins. Manually re-run the job to try again."
910- exit 1
911- fi
912918 done
919+ echo "The release was not available after 30 mins. Manually re-run the job to try again."
920+ exit 1
913921
914922publishing-gate :
915923 needs :
You can’t perform that action at this time.
0 commit comments