buildenv: add our GCP project numbers in addition to their named IDs
Updates golang/go#25108
Change-Id: I5a82a4b26407158cf24d770a887759f8335d6441
Reviewed-on: https://go-review.googlesource.com/111640
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/buildenv/envs.go b/buildenv/envs.go
index 3f43924..531e7e8 100644
--- a/buildenv/envs.go
+++ b/buildenv/envs.go
@@ -51,6 +51,11 @@
// This field may be overridden as necessary without impacting other fields.
ProjectName string
+ // ProjectNumber is the GCP project's number, as visible in the admin console.
+ // This is used for things such as constructing the "email" of the default
+ // service account.
+ ProjectNumber int64
+
// The IsProd flag indicates whether production functionality should be
// enabled. When true, GCE and Kubernetes builders are enabled and the
// coordinator serves on 443. Otherwise, GCE and Kubernetes builders are
@@ -210,12 +215,13 @@
// For local dev, override the project with the program's flag to set
// a custom project.
var Staging = &Environment{
- ProjectName: "go-dashboard-dev",
- IsProd: true,
- Zone: "us-central1-f",
- ZonesToClean: []string{"us-central1-a", "us-central1-b", "us-central1-f"},
- StaticIP: "104.154.113.235",
- MachineType: "n1-standard-1",
+ ProjectName: "go-dashboard-dev",
+ ProjectNumber: 302018677728,
+ IsProd: true,
+ Zone: "us-central1-f",
+ ZonesToClean: []string{"us-central1-a", "us-central1-b", "us-central1-f"},
+ StaticIP: "104.154.113.235",
+ MachineType: "n1-standard-1",
KubeBuild: KubeConfig{
MinNodes: 1,
MaxNodes: 2,
@@ -240,12 +246,13 @@
// Production defines the environment that the coordinator and build
// infrastructure is deployed to for production usage at build.golang.org.
var Production = &Environment{
- ProjectName: "symbolic-datum-552",
- IsProd: true,
- Zone: "us-central1-f",
- ZonesToClean: []string{"us-central1-f"},
- StaticIP: "107.178.219.46",
- MachineType: "n1-standard-4",
+ ProjectName: "symbolic-datum-552",
+ ProjectNumber: 872405196845,
+ IsProd: true,
+ Zone: "us-central1-f",
+ ZonesToClean: []string{"us-central1-f"},
+ StaticIP: "107.178.219.46",
+ MachineType: "n1-standard-4",
KubeBuild: KubeConfig{
MinNodes: 5,
MaxNodes: 5, // auto-scaling disabled