Add event log for push

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: f5a07f0c884fc6d4fa7882cd8d07319c9bcfba1c
Component: engine
This commit is contained in:
Ma Shimiao
2015-04-10 15:53:05 +08:00
parent 6b4495dbae
commit 0a6b6476fe

View File

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