Merge pull request #12264 from Mashimiao/add-event-log-for-push

Add event log for push
This commit is contained in:
Michael Crosby 2015-04-13 11:03:09 -07:00
commit 38761bda79
1 changed files with 2 additions and 0 deletions

View File

@ -536,6 +536,7 @@ func (s *TagStore) CmdPush(job *engine.Job) error {
if repoInfo.Index.Official || endpoint.Version == registry.APIVersion2 { if repoInfo.Index.Official || endpoint.Version == registry.APIVersion2 {
err := s.pushV2Repository(r, localRepo, job.Stdout, repoInfo, tag, sf) err := s.pushV2Repository(r, localRepo, job.Stdout, repoInfo, tag, sf)
if err == nil { if err == nil {
s.eventsService.Log("push", repoInfo.LocalName, "")
return nil return nil
} }
@ -547,6 +548,7 @@ func (s *TagStore) CmdPush(job *engine.Job) error {
if err := s.pushRepository(r, job.Stdout, repoInfo, localRepo, tag, sf); err != nil { if err := s.pushRepository(r, job.Stdout, repoInfo, localRepo, tag, sf); err != nil {
return err return err
} }
s.eventsService.Log("push", repoInfo.LocalName, "")
return nil return nil
} }