Revert "rename configFile to auth in the job"
This reverts commit e9c3e39743
.
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
parent
93f5d539fe
commit
331e77f9ed
3 changed files with 6 additions and 4 deletions
|
@ -881,6 +881,7 @@ 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 = ®istry.AuthConfig{}
|
||||
|
@ -895,6 +896,7 @@ 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))
|
||||
|
@ -917,7 +919,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("auth", configFile)
|
||||
job.SetenvJson("configFile", configFile)
|
||||
|
||||
if err := job.Run(); err != nil {
|
||||
if !job.Stdout.Used() {
|
||||
|
|
|
@ -83,7 +83,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("auth", b.configFile)
|
||||
job.SetenvJson("configFile", b.configFile)
|
||||
job.Stdout.Add(b.outOld)
|
||||
if err := job.Run(); err != nil {
|
||||
return err
|
||||
|
|
|
@ -432,7 +432,7 @@ func (srv *Server) Build(job *engine.Job) engine.Status {
|
|||
tag string
|
||||
context io.ReadCloser
|
||||
)
|
||||
job.GetenvJson("auth", configFile)
|
||||
job.GetenvJson("configFile", configFile)
|
||||
repoName, tag = utils.ParseRepositoryTag(repoName)
|
||||
|
||||
if remoteURL == "" {
|
||||
|
@ -1349,7 +1349,7 @@ func (srv *Server) ImagePull(job *engine.Job) engine.Status {
|
|||
tag = job.Args[1]
|
||||
}
|
||||
|
||||
job.GetenvJson("auth", configFile)
|
||||
job.GetenvJson("configFile", configFile)
|
||||
job.GetenvJson("metaHeaders", metaHeaders)
|
||||
|
||||
endpoint, _, err := registry.ResolveRepositoryName(localName)
|
||||
|
|
Loading…
Reference in a new issue