本文整理汇总了Golang中github.com/wercker/wercker/util.Environment.GetPassthru方法的典型用法代码示例。如果您正苦于以下问题:Golang Environment.GetPassthru方法的具体用法?Golang Environment.GetPassthru怎么用?Golang Environment.GetPassthru使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/wercker/wercker/util.Environment
的用法示例。
在下文中一共展示了Environment.GetPassthru方法的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())
}