site

package
v0.0.0-...-e560ebb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package site contains site local constants for the crosfleet tool.

Index

Constants

View Source
const VersionNumber = 3

VersionNumber is the service version number for the crosfleet tool.

Variables

View Source
var DefaultAuthOptions = auth.Options{

	ClientID:     "446450136466-2hr92jrq8e6i4tnsa56b52vacp7t3936.apps.googleusercontent.com",
	ClientSecret: "uBfbay2KCy9t4QveJ-dOqHtp",
	SecretsDir:   SecretsDir(),
	Scopes:       []string{auth.OAuthScopeEmail, gitiles.OAuthScope},
}

DefaultAuthOptions is an auth.Options struct prefilled with chrome-infra defaults.

View Source
var DefaultPRPCOptions = prpcOptionWithUserAgent(fmt.Sprintf("crosfleet/%d", VersionNumber))

DefaultPRPCOptions is used for PRPC clients. If it is nil, the default value is used. See prpc.Options for details.

This is provided so it can be overridden for testing.

View Source
var Dev = Environment{
	SwarmingService: "https://chromium-swarm-dev.appspot.com/",
	UFSService:      "staging.ufs.api.cr.dev",

	BuildbucketService: "cr-buildbucket.appspot.com",
	CTPBuilder: &buildbucket_pb.BuilderID{
		Project: "chromeos",
		Bucket:  "testplatform",
		Builder: "cros_test_platform-dev",
	},
	DUTLeaserBuilder: &buildbucket_pb.BuilderID{
		Project: "chromeos",
		Bucket:  "test_runner",
		Builder: "dut_leaser",
	},
}

Dev is the environment for dev.

View Source
var Prod = Environment{
	SwarmingService: "https://chromeos-swarming.appspot.com/",
	UFSService:      "ufs.api.cr.dev",

	BuildbucketService: "cr-buildbucket.appspot.com",
	CTPBuilder: &buildbucket_pb.BuilderID{
		Project: "chromeos",
		Bucket:  "testplatform",
		Builder: "cros_test_platform",
	},
	DUTLeaserBuilder: &buildbucket_pb.BuilderID{
		Project: "chromeos",
		Bucket:  "test_runner",
		Builder: "dut_leaser",
	},
}

Prod is the environment for prod.

Functions

func SecretsDir

func SecretsDir() string

SecretsDir returns an absolute path to a directory (in $HOME) to keep secret files in (e.g. OAuth refresh tokens) or an empty string if $HOME can't be determined (happens in some degenerate cases, it just disables auth token cache).

Types

type Environment

type Environment struct {
	SwarmingService string
	UFSService      string

	// Buildbucket-specific values.
	BuildbucketService string
	CTPBuilder         *buildbucket_pb.BuilderID
	DUTLeaserBuilder   *buildbucket_pb.BuilderID
}

Environment contains environment specific values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL