File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,15 @@ ARG PIP_EXTRA_INDEX_URL=https://pypi.org/simple
88RUN apk update \
99 && apk add --no-cache git nodejs npm yarn
1010
11- # Install CLI and optionally override SDK version
12- RUN pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socketsecurity==$CLI_VERSION \
13- && if [ ! -z "$SDK_VERSION" ]; then \
14- pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socket-sdk-python==${SDK_VERSION}; \
11+ # Install CLI with retries for TestPyPI propagation (10 attempts, 30s each = 5 minutes total)
12+ RUN for i in $(seq 1 10); do \
13+ echo "Attempt $i/10: Installing socketsecurity==$CLI_VERSION" ; \
14+ if pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socketsecurity==$CLI_VERSION; then \
15+ break; \
16+ fi; \
17+ echo "Install failed, waiting 30s before retry..." ; \
18+ sleep 30; \
19+ done && \
20+ if [ ! -z "$SDK_VERSION" ]; then \
21+ pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socket-sdk-python==${SDK_VERSION}; \
1522 fi
You can’t perform that action at this time.
0 commit comments