This commit is contained in:
병준 박 2025-04-10 14:40:27 +00:00
parent a4ff1ba822
commit 49208c624a

View File

@ -54,8 +54,6 @@ spec:
if [ -f pyproject.toml ]; then if [ -f pyproject.toml ]; then
echo "[INFO] Using Poetry to install dependencies" echo "[INFO] Using Poetry to install dependencies"
pip install poetry tomli --root-user-action=ignore pip install poetry tomli --root-user-action=ignore
poetry config virtualenvs.in-project true
poetry lock --no-cache --regenerate
PYPI_USER="$(params.pypi-username)" PYPI_USER="$(params.pypi-username)"
PYPI_PASS="$(params.pypi-password)" PYPI_PASS="$(params.pypi-password)"
@ -67,13 +65,18 @@ spec:
PYPI_PASS=$(cat /workspace/pypi-auth/password) PYPI_PASS=$(cat /workspace/pypi-auth/password)
fi fi
echo "[INFO] PYPI_PASS: $PYPI_PASS"
REPO_NAME=$(python3 -c 'import tomli; print(tomli.load(open("pyproject.toml", "rb"))["tool"]["poetry"]["source"][0]["name"])') REPO_NAME=$(python3 -c 'import tomli; print(tomli.load(open("pyproject.toml", "rb"))["tool"]["poetry"]["source"][0]["name"])')
REPO_URL=$(python3 -c 'import tomli; print(tomli.load(open("pyproject.toml", "rb"))["tool"]["poetry"]["source"][0]["url"])') REPO_URL=$(python3 -c 'import tomli; print(tomli.load(open("pyproject.toml", "rb"))["tool"]["poetry"]["source"][0]["url"])')
echo "[INFO] Configuring poetry source '$REPO_NAME' → $REPO_URL" echo "[INFO] Configuring poetry source '$REPO_NAME' → $REPO_URL"
poetry config virtualenvs.in-project true
poetry config repositories."$REPO_NAME" "$REPO_URL" poetry config repositories."$REPO_NAME" "$REPO_URL"
poetry config http-basic."$REPO_NAME" "$PYPI_USER" "$PYPI_PASS" poetry config http-basic."$REPO_NAME" "$PYPI_USER" "$PYPI_PASS"
poetry lock --no-cache --regenerate
poetry install --no-root poetry install --no-root
elif [ -f requirements.txt ]; then elif [ -f requirements.txt ]; then
echo "[INFO] Using pip to install dependencies" echo "[INFO] Using pip to install dependencies"