-
Notifications
You must be signed in to change notification settings - Fork 288
Expand file tree
/
Copy pathcloud-batch.yaml
More file actions
67 lines (62 loc) · 2.21 KB
/
cloud-batch.yaml
File metadata and controls
67 lines (62 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
tags:
- m.batch-job-template
- m.batch-login-node
- m.filestore
- m.pre-existing-vpc
- batch
substitutions:
_TEST_PREFIX: "" # Default to no prefix
timeout: 14400s # 4hr
steps:
# While using static network names we are guarding against more than 1 instance running at a time (for multi-group tests)
- id: check_for_running_build
name: gcr.io/cloud-builders/gcloud
env:
- "BUILD_ID=$BUILD_ID"
script: "tools/cloud-build/check_running_build.sh ${_TRIGGER_BUILD_CONFIG_PATH}"
# Test Cloud Batch Example
- id: cloud-batch
name: us-central1-docker.pkg.dev/$PROJECT_ID/hpc-toolkit-repo/test-runner
entrypoint: /bin/bash
env:
- "ANSIBLE_HOST_KEY_CHECKING=false"
- "ANSIBLE_CONFIG=/workspace/tools/cloud-build/ansible.cfg"
args:
- -c
- |
set -x -e
cd /workspace
if [ "${_TEST_PREFIX}" == "daily-" ]; then
gsutil cp gs://$${GCLUSTER_GCS_PATH}/latest/gcluster-bundle.zip .
unzip -o gcluster-bundle.zip
# Grant execution permissions to the binary
chmod +x gcluster
else
make
fi
BUILD_ID_FULL=$BUILD_ID
BUILD_ID_SHORT=$${BUILD_ID_FULL:0:6}
BLUEPRINT=examples/serverless-batch.yaml
bash tools/add_ttl_label.sh $${BLUEPRINT}
ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
--extra-vars="@tools/cloud-build/daily-tests/tests/cloud-batch.yml"
secretEnv: ['GCLUSTER_GCS_PATH']
availableSecrets:
secretManager:
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest
env: 'GCLUSTER_GCS_PATH'