rename configFile to auth in the job

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: e9c3e397436221528312c0d3b291ae5a12862ed2
Component: engine
This commit is contained in:
Victor Vieux
2014-04-14 17:15:22 +00:00
parent f3aecbde7d
commit 51ab1031ea
3 changed files with 4 additions and 6 deletions
+1 -3
View File
@@ -838,7 +838,6 @@ func postBuild(eng *engine.Engine, version version.Version, w http.ResponseWrite
// Both headers will be parsed and sent along to the daemon, but if a non-empty
// ConfigFile is present, any value provided as an AuthConfig directly will
// be overridden. See BuildFile::CmdFrom for details.
// /*
var (
authEncoded = r.Header.Get("X-Registry-Auth")
authConfig = &registry.AuthConfig{}
@@ -853,7 +852,6 @@ func postBuild(eng *engine.Engine, version version.Version, w http.ResponseWrite
configFile.Configs[authConfig.ServerAddress] = *authConfig
}
}
// */
if configFileEncoded != "" {
configFileJson := base64.NewDecoder(base64.URLEncoding, strings.NewReader(configFileEncoded))
@@ -876,7 +874,7 @@ func postBuild(eng *engine.Engine, version version.Version, w http.ResponseWrite
job.Setenv("q", r.FormValue("q"))
job.Setenv("nocache", r.FormValue("nocache"))
job.Setenv("rm", r.FormValue("rm"))
job.SetenvJson("configFile", configFile)
job.SetenvJson("auth", configFile)
if err := job.Run(); err != nil {
if !job.Stdout.Used() {
+1 -1
View File
@@ -82,7 +82,7 @@ func (b *buildFile) CmdFrom(name string) error {
job := b.srv.Eng.Job("pull", remote, tag)
job.SetenvBool("json", b.sf.Json())
job.SetenvBool("parallel", true)
job.SetenvJson("configFile", b.configFile)
job.SetenvJson("auth", b.configFile)
job.Stdout.Add(b.outOld)
if err := job.Run(); err != nil {
return err
+2 -2
View File
@@ -452,7 +452,7 @@ func (srv *Server) Build(job *engine.Job) engine.Status {
tag string
context io.ReadCloser
)
job.GetenvJson("configFile", configFile)
job.GetenvJson("auth", configFile)
repoName, tag = utils.ParseRepositoryTag(repoName)
if remoteURL == "" {
@@ -1392,7 +1392,7 @@ func (srv *Server) ImagePull(job *engine.Job) engine.Status {
tag = job.Args[1]
}
job.GetenvJson("configFile", configFile)
job.GetenvJson("auth", configFile)
job.GetenvJson("metaHeaders", metaHeaders)
endpoint, _, err := registry.ResolveRepositoryName(localName)