mirror of
https://github.com/floci-io/floci.git
synced 2026-11-29 16:35:29 -05:00
ci: retry Maven wrapper setup in image builds (#9722)
Signed-off-by: Andre Kurait <akurait@amazon.com> Signed-off-by: Jackson Price <jxnprice@amazon.com> Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
1 parent
3a0cce0188
commit
0efe6e28ca
1 file changed
+30
@@ -141,6 +141,30 @@ jobs:
|
||||
persist-credentials: false
|
||||
ref: ${{ inputs.source-ref }}
|
||||
|
||||
- &restore-maven-wrapper
|
||||
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/.m2/wrapper
|
||||
key: maven-wrapper-${{ runner.os }}-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
|
||||
|
||||
# Run inline because source-ref can select older revisions of the project.
|
||||
- &bootstrap-maven
|
||||
name: Bootstrap Maven distribution
|
||||
shell: bash
|
||||
run: |
|
||||
for attempt in 1 2 3; do
|
||||
if timeout --kill-after=5s 60s ./mvnw --version; then
|
||||
exit 0
|
||||
else
|
||||
status=$?
|
||||
fi
|
||||
if (( attempt == 3 )); then
|
||||
exit "$status"
|
||||
fi
|
||||
echo "::warning::Maven wrapper setup failed (exit $status), retrying."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
- name: Resolve source revision
|
||||
id: source
|
||||
shell: bash
|
||||
@@ -183,6 +207,9 @@ jobs:
|
||||
cache: maven
|
||||
github-token: ${{ github.token }}
|
||||
|
||||
- *restore-maven-wrapper
|
||||
- *bootstrap-maven
|
||||
|
||||
- name: Build native executable
|
||||
# Quarkus 3.39 switches on -H:+AOTSingleCallsiteInline for Mandrel 25.0.4+. The generated
|
||||
# REST invokers for AwsQueryController.dispatch and AwsJson11Controller.handle are each the
|
||||
@@ -223,6 +250,9 @@ jobs:
|
||||
cache: maven
|
||||
github-token: ${{ github.token }}
|
||||
|
||||
- *restore-maven-wrapper
|
||||
- *bootstrap-maven
|
||||
|
||||
- name: Build native executable
|
||||
# Quarkus 3.39 switches on -H:+AOTSingleCallsiteInline for Mandrel 25.0.4+. The generated
|
||||
# REST invokers for AwsQueryController.dispatch and AwsJson11Controller.handle are each the
|
||||
|
||||
Reference in new issue
Block a user