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:
894
894
script :
895
895
- |
896
896
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
900
903
TRY=0
901
- MAX_TRIES=2
902
- DELAY=30
904
+ MAX_TRIES=30
905
+ DELAY=60
903
906
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
905
915
break
906
916
fi
907
917
sleep $DELAY
908
918
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
913
919
done
920
+ echo "The release was not available after 30 mins. Manually re-run the job to try again."
921
+ exit 1
914
922
915
923
publishing-gate :
916
924
needs :
You can’t perform that action at this time.
0 commit comments