| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package main | 5 package main |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "encoding/json" | 8 "encoding/json" |
| 9 "fmt" | 9 "fmt" |
| 10 "io/ioutil" | 10 "io/ioutil" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 } | 224 } |
| 225 | 225 |
| 226 // Let infra_path recipe module know that we are using swarmbucket paths
. | 226 // Let infra_path recipe module know that we are using swarmbucket paths
. |
| 227 // Relevant code: | 227 // Relevant code: |
| 228 // https://chromium.googlesource.com/chromium/tools/depot_tools/+/248331
450c05c59c8e966c806f00bd2475e36603/recipe_modules/infra_paths/api.py#12 | 228 // https://chromium.googlesource.com/chromium/tools/depot_tools/+/248331
450c05c59c8e966c806f00bd2475e36603/recipe_modules/infra_paths/api.py#12 |
| 229 // https://chromium.googlesource.com/chromium/tools/depot_tools/+/248331
450c05c59c8e966c806f00bd2475e36603/recipe_modules/infra_paths/path_config.py#57 | 229 // https://chromium.googlesource.com/chromium/tools/depot_tools/+/248331
450c05c59c8e966c806f00bd2475e36603/recipe_modules/infra_paths/path_config.py#57 |
| 230 props["path_config"] = "swarmbucket" | 230 props["path_config"] = "swarmbucket" |
| 231 | 231 |
| 232 // If we're not using LogDog, send out annotations. | 232 // If we're not using LogDog, send out annotations. |
| 233 bootstapSuccess := true | 233 bootstapSuccess := true |
| 234 » if !c.logdog.active() { | 234 » if !c.logdog.emitAnnotations() { |
| 235 if c.Timestamps { | 235 if c.Timestamps { |
| 236 annotateTime(ctx) | 236 annotateTime(ctx) |
| 237 } | 237 } |
| 238 annotate("SEED_STEP", BootstrapStepName) | 238 annotate("SEED_STEP", BootstrapStepName) |
| 239 annotate("STEP_CURSOR", BootstrapStepName) | 239 annotate("STEP_CURSOR", BootstrapStepName) |
| 240 if c.Timestamps { | 240 if c.Timestamps { |
| 241 annotateTime(ctx) | 241 annotateTime(ctx) |
| 242 } | 242 } |
| 243 annotate("STEP_STARTED") | 243 annotate("STEP_STARTED") |
| 244 defer func() { | 244 defer func() { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 } | 302 } |
| 303 | 303 |
| 304 func annotateTime(ctx context.Context) { | 304 func annotateTime(ctx context.Context) { |
| 305 timestamp := clock.Get(ctx).Now().Unix() | 305 timestamp := clock.Get(ctx).Now().Unix() |
| 306 annotate("CURRENT_TIMESTAMP", strconv.FormatInt(timestamp, 10)) | 306 annotate("CURRENT_TIMESTAMP", strconv.FormatInt(timestamp, 10)) |
| 307 } | 307 } |
| 308 | 308 |
| 309 func annotate(args ...string) { | 309 func annotate(args ...string) { |
| 310 fmt.Printf("@@@%s@@@\n", strings.Join(args, "@")) | 310 fmt.Printf("@@@%s@@@\n", strings.Join(args, "@")) |
| 311 } | 311 } |
| OLD | NEW |