Skip to content

Commit 1d3c825

Browse files
committed
Refine publish site CI script
Try a double publish to fix the outdated response. Closes gh-125
1 parent f57fa92 commit 1d3c825

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ci/scripts/publish-eclipse-update-site.sh

+4-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ groupId=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].i
99
version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' )
1010

1111
echo "Publishing ${buildName}/${buildNumber} to Eclipse Update Site"
12-
curl \
12+
# We need to push twice for some reason otherwise we get out of date versions
13+
for i in {1..2}; do
14+
curl \
1315
-s \
1416
--connect-timeout 240 \
1517
--max-time 2700 \
@@ -18,11 +20,8 @@ curl \
1820
-X PUT \
1921
-T "artifactory-repo/io/spring/javaformat/io.spring.javaformat.eclipse.site/${version}/io.spring.javaformat.eclipse.site-${version}.zip" \
2022
"https://api.bintray.com/content/spring/javaformat-eclipse/update-site/${version}/${version}/site.zip?explode=1&publish=1" > /dev/null || { echo "Failed to publish" >&2; exit 1; }
21-
22-
# Getting the released versions can be flaky, try a few times
23-
for i in {1..2}; do
2423
releasedVersions=$( curl -f -X GET https://api.bintray.com/packages/spring/javaformat-eclipse/update-site | jq -r '.versions[]' )
25-
sleep 10
24+
sleep 30
2625
done
2726

2827
respositories=""

0 commit comments

Comments
 (0)