improve resiliency of make venv and golang Dockerfile with retries (#14239) (#14277)

This helps with transient network problems by not failing at the first try.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
(cherry picked from commit ff9f1e5a7f)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2022-06-24 12:29:54 +01:00 committed by GitHub
parent 81f5b1f842
commit 054f53edd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -148,7 +148,7 @@ venv: requirements.txt
pyenv install --skip-existing $(PY_VERSION) &&\
pyenv local $(PY_VERSION) &&\
python3 -mvenv venv && \
pip install -r requirements.txt &&\
for i in $(seq 0 5); do sleep "$i"; pip install -r requirements.txt && break; done &&\
touch venv
# Make a Golang container that can compile our env2yaml tool.

View file

@ -1,4 +1,4 @@
FROM golang:1.17.1
RUN go env -w GO111MODULE=off && go get gopkg.in/yaml.v2
FROM golang:1
RUN go env -w GO111MODULE=off && (for i in $(seq 0 5); do sleep "$i"; go get gopkg.in/yaml.v2 && break; done)
WORKDIR /usr/local/src/env2yaml
CMD ["go", "build"]