Skip to content

Commit 53926f5

Browse files
CTK Enhancement: Updating binary using zip and secrets (#5127)
1 parent dd9e1e8 commit 53926f5

File tree

65 files changed

+643
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+643
-67
lines changed

tools/cloud-build/daily-tests/builds/ansible-vm.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,19 @@ steps:
3737
- -c
3838
- |
3939
set -x -e
40-
cd /workspace && make
40+
cd /workspace
41+
gsutil cp gs://$${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
42+
unzip -o gcluster-bundle.zip
43+
# Grant execution permissions to the binary
44+
chmod +x gcluster
4145
BUILD_ID_FULL=$BUILD_ID
4246
BUILD_ID_SHORT=$${BUILD_ID_FULL:0:6}
4347
4448
ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
4549
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
4650
--extra-vars="@tools/cloud-build/daily-tests/tests/ansible-vm.yml"
51+
secretEnv: ['GCLUSTER_GCS_PATH']
52+
availableSecrets:
53+
secretManager:
54+
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
55+
env: 'GCLUSTER_GCS_PATH'

tools/cloud-build/daily-tests/builds/batch-mpi.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ availableSecrets:
3030
secretManager:
3131
- versionName: projects/$PROJECT_ID/secrets/spack_cache_url_wrf/versions/1
3232
env: SPACK_CACHE_WRF
33+
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
34+
env: 'GCLUSTER_GCS_PATH'
3335

3436
steps:
3537
# While using static network names we are guarding against more than 1 instance running at a time (for multi-group tests)
@@ -44,12 +46,16 @@ steps:
4446
env:
4547
- "ANSIBLE_HOST_KEY_CHECKING=false"
4648
- "ANSIBLE_CONFIG=/workspace/tools/cloud-build/ansible.cfg"
47-
secretEnv: ['SPACK_CACHE_WRF']
49+
secretEnv: ['SPACK_CACHE_WRF', 'GCLUSTER_GCS_PATH']
4850
args:
4951
- -c
5052
- |
5153
set -x -e
52-
cd /workspace && make
54+
cd /workspace
55+
gsutil cp gs://$${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
56+
unzip -o gcluster-bundle.zip
57+
# Grant execution permissions to the binary
58+
chmod +x gcluster
5359
BUILD_ID_FULL=$BUILD_ID
5460
BUILD_ID_SHORT=$${BUILD_ID_FULL:0:6}
5561
SG_EXAMPLE=examples/serverless-batch-mpi.yaml

tools/cloud-build/daily-tests/builds/chrome-remote-desktop-ubuntu.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,19 @@ steps:
3636
- -c
3737
- |
3838
set -x -e
39-
cd /workspace && make
39+
cd /workspace
40+
gsutil cp gs://$${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
41+
unzip -o gcluster-bundle.zip
42+
# Grant execution permissions to the binary
43+
chmod +x gcluster
4044
BUILD_ID_FULL=$BUILD_ID
4145
BUILD_ID_SHORT=$${BUILD_ID_FULL:0:6}
4246
4347
ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
4448
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT} os=ubuntu" \
4549
--extra-vars="@tools/cloud-build/daily-tests/tests/chrome-remote-desktop.yml"
50+
secretEnv: ['GCLUSTER_GCS_PATH']
51+
availableSecrets:
52+
secretManager:
53+
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
54+
env: 'GCLUSTER_GCS_PATH'

tools/cloud-build/daily-tests/builds/chrome-remote-desktop.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,19 @@ steps:
3737
- -c
3838
- |
3939
set -x -e
40-
cd /workspace && make
40+
cd /workspace
41+
gsutil cp gs://$${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
42+
unzip -o gcluster-bundle.zip
43+
# Grant execution permissions to the binary
44+
chmod +x gcluster
4145
BUILD_ID_FULL=$BUILD_ID
4246
BUILD_ID_SHORT=$${BUILD_ID_FULL:0:6}
4347
4448
ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
4549
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT} os=default" \
4650
--extra-vars="@tools/cloud-build/daily-tests/tests/chrome-remote-desktop.yml"
51+
secretEnv: ['GCLUSTER_GCS_PATH']
52+
availableSecrets:
53+
secretManager:
54+
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
55+
env: 'GCLUSTER_GCS_PATH'

tools/cloud-build/daily-tests/builds/cloud-batch.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,19 @@ steps:
3838
- -c
3939
- |
4040
set -x -e
41-
cd /workspace && make
41+
cd /workspace
42+
gsutil cp gs://$${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
43+
unzip -o gcluster-bundle.zip
44+
# Grant execution permissions to the binary
45+
chmod +x gcluster
4246
BUILD_ID_FULL=$BUILD_ID
4347
BUILD_ID_SHORT=$${BUILD_ID_FULL:0:6}
4448
4549
ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
4650
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
4751
--extra-vars="@tools/cloud-build/daily-tests/tests/cloud-batch.yml"
52+
secretEnv: ['GCLUSTER_GCS_PATH']
53+
availableSecrets:
54+
secretManager:
55+
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
56+
env: 'GCLUSTER_GCS_PATH'

tools/cloud-build/daily-tests/builds/e2e.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,18 @@ steps:
3737
vars="project_id=$PROJECT_ID,deployment_name=$depl_name,region=$region,zone=$zone"
3838
3939
cd /workspace
40-
make
40+
gsutil cp gs://${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
41+
unzip -o gcluster-bundle.zip
42+
# Grant execution permissions to the binary
43+
chmod +x gcluster
4144
./gcluster deploy tools/cloud-build/daily-tests/blueprints/e2e.yaml --vars="$vars" --auto-approve
4245
4346
# check instance was created
4447
gcloud compute instances describe "${depl_name}-0" --project="$PROJECT_ID" --zone="$zone" >/dev/null
4548
4649
./gcluster destroy "$depl_name" --auto-approve
50+
secretEnv: ['GCLUSTER_GCS_PATH']
51+
availableSecrets:
52+
secretManager:
53+
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
54+
env: 'GCLUSTER_GCS_PATH'

tools/cloud-build/daily-tests/builds/gke-a2-highgpu-kueue-onspot.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ steps:
6868
echo "Resource policy $${POLICY_NAME} already exists in region $${REGION}."
6969
fi
7070
set -x
71-
cd /workspace && make
71+
cd /workspace
72+
gsutil cp gs://$${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
73+
unzip -o gcluster-bundle.zip
74+
# Grant execution permissions to the binary
75+
chmod +x gcluster
7276
BUILD_ID_SHORT=$${BUILD_ID:0:6}
7377
EXAMPLE_BP=tools/cloud-build/daily-tests/blueprints/gke-a2-highgpu.yaml
7478
@@ -89,3 +93,8 @@ steps:
8993
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
9094
--extra-vars="region=$${REGION} zone=$${ZONE}" \
9195
--extra-vars="@tools/cloud-build/daily-tests/tests/gke-a2-highgpu-kueue-onspot.yml"
96+
secretEnv: ['GCLUSTER_GCS_PATH']
97+
availableSecrets:
98+
secretManager:
99+
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
100+
env: 'GCLUSTER_GCS_PATH'

tools/cloud-build/daily-tests/builds/gke-a2-highgpu-kueue.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ steps:
3939
- -c
4040
- |
4141
set -x -e
42-
cd /workspace && make
42+
cd /workspace
43+
gsutil cp gs://$${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
44+
unzip -o gcluster-bundle.zip
45+
# Grant execution permissions to the binary
46+
chmod +x gcluster
4347
BUILD_ID_FULL=$BUILD_ID
4448
BUILD_ID_SHORT=$${BUILD_ID_FULL:0:6}
4549
EXAMPLE_BP=tools/cloud-build/daily-tests/blueprints/gke-a2-highgpu.yaml
@@ -54,3 +58,8 @@ steps:
5458
ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
5559
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
5660
--extra-vars="@tools/cloud-build/daily-tests/tests/gke-a2-highgpu-kueue.yml"
61+
secretEnv: ['GCLUSTER_GCS_PATH']
62+
availableSecrets:
63+
secretManager:
64+
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
65+
env: 'GCLUSTER_GCS_PATH'

tools/cloud-build/daily-tests/builds/gke-a3-highgpu-onspot.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ steps:
5252
exit 1
5353
fi
5454
set -x
55-
cd /workspace && make
55+
cd /workspace
56+
gsutil cp gs://$${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
57+
unzip -o gcluster-bundle.zip
58+
# Grant execution permissions to the binary
59+
chmod +x gcluster
5660
REGION="$${ZONE%-*}"
5761
BUILD_ID_SHORT=$${BUILD_ID:0:6}
5862
EXAMPLE_BP=examples/gke-a3-highgpu.yaml
@@ -85,3 +89,8 @@ steps:
8589
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
8690
--extra-vars="region=$${REGION} zone=$${ZONE}" \
8791
--extra-vars="@tools/cloud-build/daily-tests/tests/gke-a3-highgpu-onspot.yml"
92+
secretEnv: ['GCLUSTER_GCS_PATH']
93+
availableSecrets:
94+
secretManager:
95+
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
96+
env: 'GCLUSTER_GCS_PATH'

tools/cloud-build/daily-tests/builds/gke-a3-highgpu.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ steps:
3939
- -c
4040
- |
4141
set -x -e
42-
cd /workspace && make
42+
cd /workspace
43+
gsutil cp gs://$${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
44+
unzip -o gcluster-bundle.zip
45+
# Grant execution permissions to the binary
46+
chmod +x gcluster
4347
BUILD_ID_FULL=$BUILD_ID
4448
BUILD_ID_SHORT=$${BUILD_ID_FULL:0:6}
4549
EXAMPLE_BP=examples/gke-a3-highgpu.yaml
@@ -66,3 +70,8 @@ steps:
6670
ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
6771
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
6872
--extra-vars="@tools/cloud-build/daily-tests/tests/gke-a3-highgpu.yml"
73+
secretEnv: ['GCLUSTER_GCS_PATH']
74+
availableSecrets:
75+
secretManager:
76+
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
77+
env: 'GCLUSTER_GCS_PATH'

0 commit comments

Comments
 (0)