Skip to content

Commit 3c7e2cc

Browse files
dmitshurgopherbot
authored andcommitted
cmd/upload: delete unused buckets from bucketProject map
The upload command doesn't need to track these anymore since they're no longer used. Change-Id: I0d96f0cf3572b9f157617ff07e9f3d1496dc4d47 Reviewed-on: https://go-review.googlesource.com/c/build/+/622456 Reviewed-by: Roland Shoemaker <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent d28f106 commit 3c7e2cc

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

cmd/upload/upload.go

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var (
2929
cacheable = flag.Bool("cacheable", true, "object should be cacheable")
3030
file = flag.String("file", "", "read object from `file` ('-' for stdin)")
3131
verbose = flag.Bool("verbose", false, "verbose logging")
32-
project = flag.String("project", "", "GCE Project. If blank, it's automatically inferred from the bucket name for the common Go buckets.")
32+
project = flag.String("project", "", "GCP Project. If blank, it's automatically inferred from the bucket name for the common Go buckets.")
3333
doGzip = flag.Bool("gzip", false, "gzip the stored contents (not the upload's Content-Encoding); this forces the Content-Type to be application/octet-stream. To prevent misuse, the object name must also end in '.gz'")
3434
extraEnv = flag.String("env", "", "comma-separated list of addition KEY=val environment pairs to include in build environment when building a target to upload")
3535
)
@@ -60,7 +60,7 @@ func main() {
6060

6161
proj := *project
6262
if proj == "" {
63-
proj, _ = bucketProject[bucket]
63+
proj = bucketProject[bucket]
6464
if proj == "" {
6565
log.Fatalf("bucket %q doesn't have an associated project in upload.go", bucket)
6666
}
@@ -138,15 +138,12 @@ func main() {
138138
}
139139
}
140140

141+
// bucketProject is a map from bucket name to its Google Cloud Platform project ID.
141142
var bucketProject = map[string]string{
142-
"dev-gccgo-builder-data": "gccgo-dashboard-dev",
143-
"dev-go-builder-data": "go-dashboard-dev",
144-
"gccgo-builder-data": "gccgo-dashboard-builders",
145-
"go-builder-data": "symbolic-datum-552",
146-
"go-build-log": "symbolic-datum-552",
147-
"http2-demo-server-tls": "symbolic-datum-552",
148-
"gobuilder": "999119582588", // deprecated
149-
"golang": "999119582588",
143+
"dev-go-builder-data": "go-dashboard-dev",
144+
"go-builder-data": "symbolic-datum-552",
145+
"go-build-log": "symbolic-datum-552",
146+
"golang": "999119582588",
150147
}
151148

152149
// alreadyUploaded reports whether *file has already been uploaded and the correct contents

0 commit comments

Comments
 (0)