| # Copyright 2021 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| from PB.go.chromium.org.luci.buildbucket.proto import build as build_pb2 |
| |
| DEPS = [ |
| "fuchsia/gce", |
| "fuchsia/status_check", |
| "recipe_engine/buildbucket", |
| "recipe_engine/path", |
| ] |
| |
| |
| def RunSteps(api): |
| api.gce.create_image( |
| "http://gce-endpoint", |
| "cloud-project", |
| [{"name": "uefi-disk", "path": "images/disk.tar.gz"}], |
| "50a0cbcff444d810", |
| "fuchsia-artifacts", |
| "123456789", |
| ) |
| |
| output_path = api.path.mkdtemp().join("gce.json") |
| api.gce.create_botanist_config( |
| "http://gce-endpoint", "cloud-project", "50a0cbcff444d810", output_path |
| ) |
| |
| |
| def GenTests(api): |
| yield api.status_check.test("basic") + api.buildbucket.build( |
| build_pb2.Build( |
| infra=build_pb2.BuildInfra( |
| swarming=build_pb2.BuildInfra.Swarming( |
| hostname="chrome-swarming.appspot.com", |
| ) |
| ) |
| ) |
| ) |