Skip to content

Commit

Permalink
Manually retry and only do it on latest Sedona release
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayuasu committed Oct 22, 2024
1 parent 96e9f81 commit ba3d132
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions:
jobs:
build:
strategy:
fail-fast: false
fail-fast: true
matrix:
os: ['ubuntu-latest', 'macos-13']
spark: ['3.5.1', '3.4.3', '3.3.4']
Expand All @@ -36,6 +36,11 @@ jobs:
- spark: 3.3.4
sedona: 1.6.0
geotools: 28.2
exclude:
- os: macos-13
spark: 3.4.3
- os: macos-13
spark: 3.3.4
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down Expand Up @@ -63,8 +68,23 @@ jobs:
run: |
brew install colima
brew install docker
colima delete
colima start
n=0
max_retries=3
until [ "$n" -ge "$max_retries" ]
do
colima start || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Command failed with exit code 1. Retrying... ($((n+1))/$max_retries)"
n=$((n+1))
sleep 5
else
exit $exit_code # Exit on any code other than 1
fi
done
if [ "$n" -eq "$max_retries" ]; then
echo "Max retries reached. Failing the step."
exit 1
fi
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.darwin-amd64 -o $DOCKER_CONFIG/cli-plugins/docker-buildx
Expand Down

0 comments on commit ba3d132

Please sign in to comment.