Похоже, что сборка прекрасно клонирует репо, устанавливает зависимости верхнего уровня и затем происходит сбой при установке uv pip -e ./lib/db-client.
Код: Выделить всё
...
Step #1: Submodule 'lib/db-client' (git@github.com:path/db-client.git) registered for path 'lib/db-client'
Step #1: Cloning into '/workspace/Service/lib/db-client'...
Step #1: Submodule path 'lib/db-client': checked out '28f72f4...3443'
... goes on to install the dependencies ...
error: /app/lib/db-client does not appear to be a Python project, as neither `pyproject.toml` nor `setup.py` are present in the directory
Код: Выделить всё
git clone git@github.com:path/service.git
cd service
uv sync
uv pip install -e ./lib/db-client
uv run uvicorn app:app --host 0.0.0.0 --port 8080 --reload
Код: Выделить всё
steps:
- name: 'gcr.io/cloud-builders/git'
secretEnv: ['SSH_KEY']
entrypoint: 'bash'
args:
- -c
- |
echo "$$SSH_KEY" >> /root/.ssh/id_rsa
chmod 400 /root/.ssh/id_rsa
cp known_hosts.github /root/.ssh/known_hosts
volumes:
- name: 'ssh'
path: /root/.ssh
# Clone the repository
- name: 'gcr.io/cloud-builders/git'
args:
- clone
- --recurse-submodules
- git@github.com:path/service.git
volumes:
- name: 'ssh'
path: /root/.ssh
# Initialize and update submodules
- name: 'gcr.io/cloud-builders/git'
entrypoint: 'bash'
args:
- -c
- |
cd EmailService
git submodule init
git submodule update --init --recursive
volumes:
- name: 'ssh'
path: /root/.ssh
# Build the container image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/service', '.']
# Push the container image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/service']
# Deploy container image to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args: ['run', 'deploy', 'service', '--image', 'gcr.io/$PROJECT_ID/service', '--region', 'us-central1']
images:
- gcr.io/$PROJECT_ID/service
availableSecrets:
secretManager:
- versionName: projects/$PROJECT_ID/secrets/github-ssh-key/versions/latest
env: 'SSH_KEY'
options:
logging: CLOUD_LOGGING_ONLY
Подробнее здесь: https://stackoverflow.com/questions/793 ... cker-build
Мобильная версия