| [ |
| { |
| "cmd": [], |
| "name": "ensure_goma" |
| }, |
| { |
| "cmd": [ |
| "python", |
| "-u", |
| "RECIPE_MODULE[infra::cipd]/resources/bootstrap.py", |
| "--platform", |
| "linux-amd64", |
| "--dest-directory", |
| "[SLAVE_BUILD]/cipd", |
| "--json-output", |
| "/path/to/tmp/json" |
| ], |
| "name": "ensure_goma.install cipd", |
| "~followup_annotations": [ |
| "@@@STEP_NEST_LEVEL@1@@@", |
| "@@@STEP_TEXT@cipd instance_id: 40-chars-fake-of-the-package-instance_id@@@", |
| "@@@STEP_LOG_LINE@json.output@{@@@", |
| "@@@STEP_LOG_LINE@json.output@ \"executable\": \"[SLAVE_BUILD]/cipd/cipd\", @@@", |
| "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\"@@@", |
| "@@@STEP_LOG_LINE@json.output@}@@@", |
| "@@@STEP_LOG_END@json.output@@@" |
| ] |
| }, |
| { |
| "cmd": [ |
| "[SLAVE_BUILD]/cipd/cipd", |
| "ensure", |
| "--root", |
| "[CACHE]/cipd/goma", |
| "--list", |
| "infra_internal/goma/client/linux-amd64 release", |
| "--json-output", |
| "/path/to/tmp/json", |
| "--service-account-json", |
| "/creds/service_accounts/service-account-goma-client.json" |
| ], |
| "name": "ensure_goma.ensure_installed", |
| "~followup_annotations": [ |
| "@@@STEP_NEST_LEVEL@1@@@", |
| "@@@STEP_LOG_LINE@json.output@{@@@", |
| "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", |
| "@@@STEP_LOG_LINE@json.output@ {@@@", |
| "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-release---------\", @@@", |
| "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra_internal/goma/client/linux-amd64\"@@@", |
| "@@@STEP_LOG_LINE@json.output@ }@@@", |
| "@@@STEP_LOG_LINE@json.output@ ]@@@", |
| "@@@STEP_LOG_LINE@json.output@}@@@", |
| "@@@STEP_LOG_END@json.output@@@" |
| ] |
| }, |
| { |
| "cmd": [], |
| "name": "ensure_goma (2)" |
| }, |
| { |
| "cmd": [ |
| "python", |
| "-u", |
| "RECIPE_MODULE[infra::cipd]/resources/bootstrap.py", |
| "--platform", |
| "linux-amd64", |
| "--dest-directory", |
| "[SLAVE_BUILD]/cipd", |
| "--json-output", |
| "/path/to/tmp/json" |
| ], |
| "name": "ensure_goma.install cipd (2)", |
| "~followup_annotations": [ |
| "@@@STEP_NEST_LEVEL@1@@@", |
| "@@@STEP_TEXT@cipd instance_id: 40-chars-fake-of-the-package-instance_id@@@", |
| "@@@STEP_LOG_LINE@json.output@{@@@", |
| "@@@STEP_LOG_LINE@json.output@ \"executable\": \"[SLAVE_BUILD]/cipd/cipd\", @@@", |
| "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\"@@@", |
| "@@@STEP_LOG_LINE@json.output@}@@@", |
| "@@@STEP_LOG_END@json.output@@@" |
| ] |
| }, |
| { |
| "cmd": [ |
| "[SLAVE_BUILD]/cipd/cipd", |
| "ensure", |
| "--root", |
| "[CACHE]/cipd/goma", |
| "--list", |
| "infra_internal/goma/client/linux-amd64 candidate", |
| "--json-output", |
| "/path/to/tmp/json", |
| "--service-account-json", |
| "/creds/service_accounts/service-account-goma-client.json" |
| ], |
| "name": "ensure_goma.ensure_installed (2)", |
| "~followup_annotations": [ |
| "@@@STEP_NEST_LEVEL@1@@@", |
| "@@@STEP_LOG_LINE@json.output@{@@@", |
| "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", |
| "@@@STEP_LOG_LINE@json.output@ {@@@", |
| "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-candidate-------\", @@@", |
| "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra_internal/goma/client/linux-amd64\"@@@", |
| "@@@STEP_LOG_LINE@json.output@ }@@@", |
| "@@@STEP_LOG_LINE@json.output@ ]@@@", |
| "@@@STEP_LOG_LINE@json.output@}@@@", |
| "@@@STEP_LOG_END@json.output@@@" |
| ] |
| }, |
| { |
| "cmd": [ |
| "gn", |
| "gen", |
| "out/Release", |
| "--args=use_goma=true goma_dir=[CACHE]/cipd/goma" |
| ], |
| "name": "gn" |
| }, |
| { |
| "cmd": [ |
| "python", |
| "-u", |
| "[CACHE]/cipd/goma/goma_ctl.py", |
| "restart" |
| ], |
| "env": { |
| "GOMA_SERVICE_ACCOUNT_JSON_FILE": "/creds/service_accounts/service-account-goma-client.json" |
| }, |
| "name": "start_goma" |
| }, |
| { |
| "cmd": [ |
| "python", |
| "-u", |
| "\nimport multiprocessing\nimport sys\n\njob_limit = 200\nif sys.platform.startswith('linux'):\n # Use 80 for linux not to load goma backend.\n job_limit = 80\n\ntry:\n jobs = min(job_limit, multiprocessing.cpu_count() * 10)\nexcept NotImplementedError:\n jobs = 50\n\nprint jobs\n" |
| ], |
| "name": "calculate the number of recommended jobs", |
| "stdout": "/path/to/tmp/", |
| "~followup_annotations": [ |
| "@@@STEP_LOG_LINE@python.inline@@@@", |
| "@@@STEP_LOG_LINE@python.inline@import multiprocessing@@@", |
| "@@@STEP_LOG_LINE@python.inline@import sys@@@", |
| "@@@STEP_LOG_LINE@python.inline@@@@", |
| "@@@STEP_LOG_LINE@python.inline@job_limit = 200@@@", |
| "@@@STEP_LOG_LINE@python.inline@if sys.platform.startswith('linux'):@@@", |
| "@@@STEP_LOG_LINE@python.inline@ # Use 80 for linux not to load goma backend.@@@", |
| "@@@STEP_LOG_LINE@python.inline@ job_limit = 80@@@", |
| "@@@STEP_LOG_LINE@python.inline@@@@", |
| "@@@STEP_LOG_LINE@python.inline@try:@@@", |
| "@@@STEP_LOG_LINE@python.inline@ jobs = min(job_limit, multiprocessing.cpu_count() * 10)@@@", |
| "@@@STEP_LOG_LINE@python.inline@except NotImplementedError:@@@", |
| "@@@STEP_LOG_LINE@python.inline@ jobs = 50@@@", |
| "@@@STEP_LOG_LINE@python.inline@@@@", |
| "@@@STEP_LOG_LINE@python.inline@print jobs@@@", |
| "@@@STEP_LOG_END@python.inline@@@" |
| ] |
| }, |
| { |
| "cmd": [ |
| "echo", |
| "50" |
| ], |
| "name": "echo goma jobs" |
| }, |
| { |
| "cmd": [ |
| "echo", |
| "50" |
| ], |
| "name": "echo goma jobs second" |
| }, |
| { |
| "cmd": [ |
| "python", |
| "-u", |
| "[CACHE]/cipd/goma/goma_ctl.py", |
| "jsonstatus", |
| "[CACHE]/cipd/goma/jsonstatus" |
| ], |
| "env": { |
| "GOMA_SERVICE_ACCOUNT_JSON_FILE": "/creds/service_accounts/service-account-goma-client.json" |
| }, |
| "name": "goma_jsonstatus" |
| }, |
| { |
| "cmd": [ |
| "python", |
| "-u", |
| "[CACHE]/cipd/goma/goma_ctl.py", |
| "stat" |
| ], |
| "env": { |
| "GOMA_SERVICE_ACCOUNT_JSON_FILE": "/creds/service_accounts/service-account-goma-client.json" |
| }, |
| "name": "goma_stat" |
| }, |
| { |
| "cmd": [ |
| "python", |
| "-u", |
| "[CACHE]/cipd/goma/goma_ctl.py", |
| "stop" |
| ], |
| "env": { |
| "GOMA_SERVICE_ACCOUNT_JSON_FILE": "/creds/service_accounts/service-account-goma-client.json" |
| }, |
| "name": "stop_goma" |
| }, |
| { |
| "name": "$result", |
| "recipe_result": null, |
| "status_code": 0 |
| } |
| ] |