Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: milo/job_source/buildbucket/buckets.go

Issue 2949783002: [milo] appengine/* -> * (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The LUCI Authors. All rights reserved. 1 // Copyright 2017 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 buildbucket 5 package buildbucket
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "fmt" 9 "fmt"
10 10
11 "golang.org/x/net/context" 11 "golang.org/x/net/context"
12 12
13 "github.com/luci/luci-go/milo/api/resp" 13 "github.com/luci/luci-go/milo/api/resp"
14 » "github.com/luci/luci-go/milo/appengine/common" 14 » "github.com/luci/luci-go/milo/common"
15 ) 15 )
16 16
17 func GetAllBuilders(c context.Context) (*resp.CIService, error) { 17 func GetAllBuilders(c context.Context) (*resp.CIService, error) {
18 settings := common.GetSettings(c) 18 settings := common.GetSettings(c)
19 bucketSettings := settings.Buildbucket 19 bucketSettings := settings.Buildbucket
20 if bucketSettings == nil { 20 if bucketSettings == nil {
21 return nil, errors.New("buildbucket settings missing in config") 21 return nil, errors.New("buildbucket settings missing in config")
22 } 22 }
23 result := &resp.CIService{ 23 result := &resp.CIService{
24 Name: "Swarmbucket", 24 Name: "Swarmbucket",
(...skipping 15 matching lines...) Expand all
40 group.Builders = make([]resp.Link, len(bucket.Builders)) 40 group.Builders = make([]resp.Link, len(bucket.Builders))
41 for j, builder := range bucket.Builders { 41 for j, builder := range bucket.Builders {
42 group.Builders[j] = *resp.NewLink( 42 group.Builders[j] = *resp.NewLink(
43 builder.Name, fmt.Sprintf("/buildbucket/%s/%s", bucket.Name, builder.Name)) 43 builder.Name, fmt.Sprintf("/buildbucket/%s/%s", bucket.Name, builder.Name))
44 } 44 }
45 result.BuilderGroups[i] = group 45 result.BuilderGroups[i] = group
46 } 46 }
47 47
48 return result, nil 48 return result, nil
49 } 49 }
OLDNEW
« no previous file with comments | « milo/job_source/buildbot/testdata/win_chromium_rel_ng.246309.json ('k') | milo/job_source/buildbucket/builder.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698