File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
packages/google-cloud-storage/cloudbuild Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,12 @@ echo '--- Installing git and cloning repository on VM ---'
44sudo apt-get update && sudo apt-get install -y git python3-pip python3-venv
55
66# Clone the repository and checkout the specific commit from the build trigger.
7- git clone https://github.com/googleapis/python-storage.git
8- cd python-storage
7+ git clone --no-checkout --depth 1 --sparse --filter=blob:none https://github.com/googleapis/google-cloud-python.git
8+ cd google-cloud-python
9+ git sparse-checkout set packages/google-cloud-storage
910git fetch origin " refs/pull/${_PR_NUMBER} /head"
1011git checkout ${COMMIT_SHA}
12+ cd packages/google-cloud-storage
1113
1214
1315echo ' --- Installing Python and dependencies on VM ---'
Original file line number Diff line number Diff line change @@ -63,12 +63,12 @@ steps:
6363 sleep 15
6464 done
6565 # copy the script to the VM
66- gcloud compute scp cloudbuild/run_zonal_tests.sh ${_VM_NAME}:~ --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine
66+ gcloud compute scp packages/google-cloud-storage/ cloudbuild/run_zonal_tests.sh ${_VM_NAME}:~ --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine
6767
6868 # Execute the script on the VM via SSH.
6969 # Capture the exit code to ensure cleanup happens before the build fails.
7070 set +e
71- gcloud compute ssh ${_VM_NAME} --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine --command="ulimit -n {_ULIMIT}; COMMIT_SHA=${COMMIT_SHA} _ZONAL_BUCKET=${_ZONAL_BUCKET} CROSS_REGION_BUCKET=${_CROSS_REGION_BUCKET} _PR_NUMBER=${_PR_NUMBER} bash run_zonal_tests.sh"
71+ gcloud compute ssh ${_VM_NAME} --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine --command="ulimit -n $ {_ULIMIT}; COMMIT_SHA=${COMMIT_SHA} _ZONAL_BUCKET=${_ZONAL_BUCKET} CROSS_REGION_BUCKET=${_CROSS_REGION_BUCKET} _PR_NUMBER=${_PR_NUMBER} bash run_zonal_tests.sh"
7272 EXIT_CODE=$?
7373 set -e
7474
You can’t perform that action at this time.
0 commit comments