@@ -90,9 +90,13 @@ func (t *Task) Run() error {
90
90
}
91
91
92
92
func (t * Task ) SyncListTypeImageByManifest (manifestBytes []byte , subManifestInfoSlice []* ManifestInfo ) error {
93
- // TODO: ignore list-type image if not changed
94
- // Docker manifest list (and its tag) might still exist even it's deleted, we will always update it because we
95
- // cannot make sure if it can be ignored.
93
+ if changed := t .destination .CheckManifestChanged (manifestBytes , "" ); ! changed {
94
+ // do nothing if manifest is unchanged
95
+ t .Infof ("Dest manifest list %s/%s:%s is unchanged, will do nothing" ,
96
+ t .destination .GetRegistry (), t .destination .GetRepository (), t .destination .GetTag ())
97
+ return nil
98
+ }
99
+
96
100
for _ , mfstInfo := range subManifestInfoSlice {
97
101
if err := t .SyncNonListTypeImageByManifest (mfstInfo .obj , mfstInfo .bytes ,
98
102
mfstInfo .digest .String (), mfstInfo .digest .String (), true ); err != nil {
@@ -112,8 +116,8 @@ func (t *Task) SyncNonListTypeImageByManifest(manifestObj interface{}, manifestB
112
116
srcTagOrDigest , dstTagOrDigest string , belongsToList bool ) error {
113
117
114
118
if changed := t .destination .CheckManifestChanged (manifestBytes , dstTagOrDigest ); ! changed {
115
- // do nothing if manifest is not changed
116
- t .Infof ("Dest manifest %s/%s:%s is not changed , will do nothing" ,
119
+ // do nothing if manifest is unchanged
120
+ t .Infof ("Dest manifest %s/%s:%s is unchanged , will do nothing" ,
117
121
t .destination .GetRegistry (), t .destination .GetRepository (), dstTagOrDigest )
118
122
return nil
119
123
}
0 commit comments