本文整理匯總了Golang中github.com/wercker/wercker/util.Environment.GetHiddenPassthru方法的典型用法代碼示例。如果您正苦於以下問題:Golang Environment.GetHiddenPassthru方法的具體用法?Golang Environment.GetHiddenPassthru怎麽用?Golang Environment.GetHiddenPassthru使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/wercker/wercker/util.Environment
的用法示例。
在下文中一共展示了Environment.GetHiddenPassthru方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: InitEnv
// InitEnv sets up the internal state of the environment for the build
func (b *DockerBuild) InitEnv(hostEnv *util.Environment) {
env := b.Env()
a := [][]string{
[]string{"BUILD", "true"},
[]string{"CI", "true"},
[]string{"WERCKER_RUN_ID", b.options.RunID},
[]string{"WERCKER_RUN_URL", b.options.WorkflowURL()},
[]string{"WERCKER_GIT_DOMAIN", b.options.GitDomain},
[]string{"WERCKER_GIT_OWNER", b.options.GitOwner},
[]string{"WERCKER_GIT_REPOSITORY", b.options.GitRepository},
[]string{"WERCKER_GIT_BRANCH", b.options.GitBranch},
[]string{"WERCKER_GIT_COMMIT", b.options.GitCommit},
// Legacy env vars
[]string{"WERCKER_BUILD_ID", b.options.RunID},
[]string{"WERCKER_BUILD_URL", b.options.WorkflowURL()},
}
env.Update(b.CommonEnv())
env.Update(a)
env.Update(hostEnv.GetMirror())
env.Update(hostEnv.GetPassthru().Ordered())
env.Hidden.Update(hostEnv.GetHiddenPassthru().Ordered())
}
示例2: InitEnv
// InitEnv sets up the internal state of the environment for the build
func (d *DockerDeploy) InitEnv(hostEnv *util.Environment) {
env := d.Env()
a := [][]string{
[]string{"DEPLOY", "true"},
[]string{"WERCKER_RUN_ID", d.options.RunID},
[]string{"WERCKER_RUN_URL", d.options.WorkflowURL()},
[]string{"WERCKER_GIT_DOMAIN", d.options.GitDomain},
[]string{"WERCKER_GIT_OWNER", d.options.GitOwner},
[]string{"WERCKER_GIT_REPOSITORY", d.options.GitRepository},
[]string{"WERCKER_GIT_BRANCH", d.options.GitBranch},
[]string{"WERCKER_GIT_COMMIT", d.options.GitCommit},
// Legacy env vars
[]string{"WERCKER_DEPLOY_ID", d.options.RunID},
[]string{"WERCKER_DEPLOY_URL", d.options.WorkflowURL()},
}
if d.options.DeployTarget != "" {
a = append(a, []string{"WERCKER_DEPLOYTARGET_NAME", d.options.DeployTarget})
}
env.Update(d.CommonEnv())
env.Update(a)
env.Update(hostEnv.GetMirror())
env.Update(hostEnv.GetPassthru().Ordered())
env.Hidden.Update(hostEnv.GetHiddenPassthru().Ordered())
}
示例3: InitEnv
// InitEnv sets up the internal state of the environment for the build
func (b *DockerBuild) InitEnv(hostEnv *util.Environment) {
env := b.Env()
a := [][]string{
[]string{"BUILD", "true"},
[]string{"CI", "true"},
[]string{"WERCKER_BUILD_ID", b.options.BuildID},
[]string{"WERCKER_BUILD_URL", fmt.Sprintf("%s/#build/%s", b.options.BaseURL, b.options.BuildID)},
[]string{"WERCKER_GIT_DOMAIN", b.options.GitDomain},
[]string{"WERCKER_GIT_OWNER", b.options.GitOwner},
[]string{"WERCKER_GIT_REPOSITORY", b.options.GitRepository},
[]string{"WERCKER_GIT_BRANCH", b.options.GitBranch},
[]string{"WERCKER_GIT_COMMIT", b.options.GitCommit},
}
env.Update(b.CommonEnv())
env.Update(a)
env.Update(hostEnv.GetMirror())
env.Update(hostEnv.GetPassthru().Ordered())
env.Hidden.Update(hostEnv.GetHiddenPassthru().Ordered())
}