1
0
Fork 0

enabled linux queue from google gcp

--pipeline parameter for sample build script
This commit is contained in:
Mikhail Goncharov 2023-07-17 15:38:21 +02:00
parent 858ed55646
commit b3ba37eb05
2 changed files with 6 additions and 5 deletions

View file

@ -58,7 +58,7 @@ spec:
fieldRef: fieldRef:
fieldPath: metadata.name fieldPath: metadata.name
- name: BUILDKITE_AGENT_TAGS - name: BUILDKITE_AGENT_TAGS
value: "queue=linux,name=$(POD_NAME)" value: "queue=linux,name=$(POD_NAME),cluster=google"
- name: BUILDKITE_BUILD_PATH - name: BUILDKITE_BUILD_PATH
value: "/var/lib/buildkite-agent/builds" value: "/var/lib/buildkite-agent/builds"
- name: CONDUIT_TOKEN - name: CONDUIT_TOKEN

View file

@ -8,8 +8,11 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Run sample build on buildkite.') parser = argparse.ArgumentParser(description='Run sample build on buildkite.')
parser.add_argument('--dryrun', action='store_true') parser.add_argument('--dryrun', action='store_true')
parser.add_argument('--commit') parser.add_argument('--commit')
pipeline='upstream-bazel-test' parser.add_argument('--pipeline', default='llvm-main')
args = parser.parse_args() args = parser.parse_args()
pipeline=args.pipeline
time.sleep(2) time.sleep(2)
d = json.dumps({ d = json.dumps({
'branch': 'main', 'branch': 'main',
@ -17,7 +20,7 @@ if __name__ == '__main__':
'env': { 'env': {
'ph_log_level': 'DEBUG', 'ph_log_level': 'DEBUG',
#'ph_skip_linux': 'skip', #'ph_skip_linux': 'skip',
'ph_linux_agents': '{"queue": "linux-google-test"}', 'ph_linux_agents': '{"queue": "linux-test-google"}',
#'ph_linux_agents': '{"queue": "linux-test"}', #'ph_linux_agents': '{"queue": "linux-test"}',
# 'ph_linux_agents': '{"queue": "linux-clang15-test"}', # 'ph_linux_agents': '{"queue": "linux-clang15-test"}',
'ph_skip_windows': 'skip', 'ph_skip_windows': 'skip',
@ -35,8 +38,6 @@ if __name__ == '__main__':
if token is None: if token is None:
print("'BUILDKITE_API_TOKEN' environment variable is not set") print("'BUILDKITE_API_TOKEN' environment variable is not set")
exit(1) exit(1)
print(f"token {token}")
re = requests.post(f'https://api.buildkite.com/v2/organizations/llvm-project/pipelines/{pipeline}/builds', re = requests.post(f'https://api.buildkite.com/v2/organizations/llvm-project/pipelines/{pipeline}/builds',
data=d, data=d,
headers={'Authorization': f'Bearer {token}'}) headers={'Authorization': f'Bearer {token}'})