Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvVarProjectID = "PROJECT_ID" EnvVarBuildID = "BUILD_ID" EnvVarProjectNumber = "PROJECT_NUMBER" EnvVarLocation = "LOCATION" EnvVarTriggerName = "TRIGGER_NAME" EnvVarCommitSha = "COMMIT_SHA" EnvVarRevisionID = "REVISION_ID" EnvVarShortSha = "SHORT_SHA" EnvVarRepoName = "REPO_NAME" EnvVarRepoFullName = "REPO_FULL_NAME" EnvVarBranchName = "BRANCH_NAME" EnvVarTagName = "TAG_NAME" EnvVarRefName = "REF_NAME" EnvVarTriggerBuildConfigPath = "TRIGGER_BUILD_CONFIG_PATH" EnvVarServiceAccountEmail = "SERVICE_ACCOUNT_EMAIL" EnvVarServiceAccount = "SERVICE_ACCOUNT" EnvVarGitHubHeadBranch = "_HEAD_BRANCH" EnvVarGitHubBaseBranch = "_BASE_BRANCH" EnvVarGitHubHeadRepoURL = "_HEAD_REPO_URL" EnvVarGitHubPRNumber = "_PR_NUMBER" )
Variables ¶
View Source
var WorkspacePath = "/workspace"
Functions ¶
This section is empty.
Types ¶
type Step ¶
type Step struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Entrypoint string `json:"entrypoint,omitempty"` Args []string `json:"args,omitempty"` Script string `json:"script,omitempty"` Env []string `json:"env,omitempty"` Substitutions map[string]string `json:"substitutions,omitempty"` AutomapSubstitutions bool `json:"automapSubstitutions,omitempty"` DynamicSubstitutions bool `json:"dynamicSubstitutions,omitempty"` }
Step represents a CloudBuild step.
type Substitutions ¶
type Substitutions struct { ProjectID string BuildID string ProjectNumber int Location string TriggerName string CommitSha string RevisionID string ShortSha string RepoName string RepoFullName string BranchName string TagName string RefName string TriggerBuildConfigPath string ServiceAccountEmail string ServiceAccount string GitHubHeadBranch string GitHubBaseBranch string GitHubHeadRepoURL string GitHubPRNumber int UserDefined map[string]string }
func NewSubstituionsFromPath ¶
func NewSubstituionsFromPath(path string, userDefinedSubstitutions map[string]string) (*Substitutions, error)
NewSubstituionsFromPath returns a map of default substitutions whose values are sourced from the git repository at the given path and the environment. See https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values#using_default_substitutions.
func NewSubstitutionsFromEnv ¶
func NewSubstitutionsFromEnv(userDefinedSubstitutions map[string]string) (*Substitutions, error)
NewSubstitutionsFromEnv returns a map of default substitutions whose values are sourced from the environment. See https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values#using_default_substitutions.
func (*Substitutions) Env ¶
func (s *Substitutions) Env() []string
Click to show internal directories.
Click to hide internal directories.