make retries in pip and go get extra shell compatible (#14282) (#14294)

the use of ranges (e.g. {0..5}) or seq (e.g. $(seq 0 5)) may not
correctly in some systems, so let's just have a plain list of elements
for the loop to go through.

(cherry picked from commit ce27e08eac)

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

View file

@ -148,7 +148,7 @@ venv: requirements.txt
pyenv install --skip-existing $(PY_VERSION) &&\
pyenv local $(PY_VERSION) &&\
python3 -mvenv venv && \
for i in $(seq 0 5); do sleep "$i"; pip install -r requirements.txt && break; done &&\
for i in 0 1 2 3 4 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
RUN go env -w GO111MODULE=off && (for i in $(seq 0 5); do sleep "$i"; go get gopkg.in/yaml.v2 && break; done)
RUN go env -w GO111MODULE=off && (for i in 0 1 2 3 4 5; do sleep "$i"; go get gopkg.in/yaml.v2 && break; done)
WORKDIR /usr/local/src/env2yaml
CMD ["go", "build"]