Explorar o código

c8d: Add image push events

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Djordje Lukic hai 1 ano
pai
achega
1847dc4b7f
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      daemon/containerd/image_push.go

+ 4 - 0
daemon/containerd/image_push.go

@@ -16,6 +16,7 @@ import (
 	"github.com/containerd/containerd/remotes"
 	"github.com/containerd/containerd/remotes"
 	"github.com/containerd/containerd/remotes/docker"
 	"github.com/containerd/containerd/remotes/docker"
 	"github.com/distribution/reference"
 	"github.com/distribution/reference"
+	"github.com/docker/docker/api/types/events"
 	"github.com/docker/docker/api/types/registry"
 	"github.com/docker/docker/api/types/registry"
 	"github.com/docker/docker/errdefs"
 	"github.com/docker/docker/errdefs"
 	"github.com/docker/docker/pkg/progress"
 	"github.com/docker/docker/pkg/progress"
@@ -147,6 +148,9 @@ func (i *ImageService) PushImage(ctx context.Context, targetRef reference.Named,
 		}
 		}
 	}
 	}
 
 
+	if err == nil {
+		i.LogImageEvent(reference.FamiliarString(targetRef), reference.FamiliarName(targetRef), events.ActionPush)
+	}
 	return err
 	return err
 }
 }