From ca948518d9c11a592c095a30bdc886ef7385251e Mon Sep 17 00:00:00 2001 From: Bruce Bujon Date: Thu, 16 Apr 2026 19:06:55 +0200 Subject: [PATCH] fix(ci): Add an immediate try at maven deployment check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the job is retried, we don’t want to wait for 5m before the first try. --- .gitlab-ci.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc3ff9d1277..afd1135317c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1017,11 +1017,12 @@ verify_maven_central_deployment: "https://repo1.maven.org/maven2/com/datadoghq/dd-trace-api/${VERSION}/dd-trace-api-${VERSION}.jar" "https://repo1.maven.org/maven2/com/datadoghq/dd-trace-ot/${VERSION}/dd-trace-ot-${VERSION}.jar" ) - # Wait 5 mins initially, then try 5 times with a minute delay between each retry to see if the release artifacts are available - sleep 300 + # Try once immediately (fast path on job retry), then wait 5 mins for initial propagation, + # then try 4 more times with a minute delay between each retry. TRY=0 - MAX_TRIES=5 - DELAY=60 + MAX_TRIES=6 + INITIAL_DELAY=300 + RETRY_DELAY=60 while [ $TRY -lt $MAX_TRIES ]; do ARTIFACTS_AVAILABLE=true for URL in "${ARTIFACT_URLS[@]}"; do @@ -1038,7 +1039,11 @@ verify_maven_central_deployment: echo "The release was not available after 10 mins. Manually re-run the job to try again." exit 1 fi - sleep $DELAY + if [ $TRY -eq 1 ]; then + sleep $INITIAL_DELAY + else + sleep $RETRY_DELAY + fi done publishing-gate: