Skip to content

Commit 983fc08

Browse files
committed
wip
1 parent 810182a commit 983fc08

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/google-cloud-storage/cloudbuild/zb-system-tests-cloudbuild.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ steps:
2121
ssh-keygen -t rsa -f /workspace/.ssh/google_compute_engine -N '' -C gcb
2222
# Save the public key content to a file for the cleanup step
2323
cat /workspace/.ssh/google_compute_engine.pub > /workspace/gcb_ssh_key.pub
24-
waitFor: ["-"]
24+
# Register the key with OS Login
25+
gcloud compute os-login ssh-keys add --key-file=/workspace/.ssh/google_compute_engine.pub
26+
waitFor: ["cleanup-old-keys"]
2527

2628
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
2729
id: "cleanup-old-keys"
@@ -57,6 +59,7 @@ steps:
5759
5860
echo "---------------------------------------------------------------------"
5961
echo "Cleanup complete."
62+
waitFor: ["-"]
6063

6164
# Step 1 Create a GCE VM to run the tests.
6265
# The VM is created in the same zone as the buckets to test rapid storage features.
@@ -77,7 +80,7 @@ steps:
7780
- "--service-account=${_ZONAL_VM_SERVICE_ACCOUNT}"
7881
- "--scopes=https://www.googleapis.com/auth/devstorage.full_control,https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/devstorage.read_write,https://www.googleapis.com/auth/cloudkms"
7982
- "--metadata=enable-oslogin=TRUE"
80-
waitFor: ["-"]
83+
waitFor: ["cleanup-old-keys"]
8184

8285
# Step 2: Run the integration tests inside the newly created VM and cleanup.
8386
# This step uses 'gcloud compute ssh' to execute a remote script.
@@ -115,7 +118,6 @@ steps:
115118
waitFor:
116119
- "create-vm"
117120
- "generate-ssh-key"
118-
- "cleanup-old-keys"
119121

120122
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
121123
id: "cleanup-ssh-key"

0 commit comments

Comments
 (0)