ECR: image digest fix (#6999)
This commit is contained in:
parent
6e9960895e
commit
060b10974f
@ -560,6 +560,7 @@ class ECRBackend(BaseBackend):
|
|||||||
image_manifest: str,
|
image_manifest: str,
|
||||||
image_tag: str,
|
image_tag: str,
|
||||||
image_manifest_mediatype: Optional[str] = None,
|
image_manifest_mediatype: Optional[str] = None,
|
||||||
|
digest: Optional[str] = None,
|
||||||
) -> Image:
|
) -> Image:
|
||||||
if repository_name in self.repositories:
|
if repository_name in self.repositories:
|
||||||
repository = self.repositories[repository_name]
|
repository = self.repositories[repository_name]
|
||||||
@ -612,6 +613,7 @@ class ECRBackend(BaseBackend):
|
|||||||
image_manifest,
|
image_manifest,
|
||||||
repository_name,
|
repository_name,
|
||||||
image_manifest_mediatype,
|
image_manifest_mediatype,
|
||||||
|
digest,
|
||||||
)
|
)
|
||||||
repository.images.append(image)
|
repository.images.append(image)
|
||||||
if existing_images_with_matching_tag:
|
if existing_images_with_matching_tag:
|
||||||
|
@ -57,8 +57,9 @@ class ECRResponse(BaseResponse):
|
|||||||
image_manifest = self._get_param("imageManifest")
|
image_manifest = self._get_param("imageManifest")
|
||||||
image_tag = self._get_param("imageTag")
|
image_tag = self._get_param("imageTag")
|
||||||
image_manifest_media_type = self._get_param("imageManifestMediaType")
|
image_manifest_media_type = self._get_param("imageManifestMediaType")
|
||||||
|
digest = self._get_param("imageDigest")
|
||||||
image = self.ecr_backend.put_image(
|
image = self.ecr_backend.put_image(
|
||||||
repository_str, image_manifest, image_tag, image_manifest_media_type
|
repository_str, image_manifest, image_tag, image_manifest_media_type, digest
|
||||||
)
|
)
|
||||||
|
|
||||||
return json.dumps({"image": image.response_object})
|
return json.dumps({"image": image.response_object})
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user