parent
d9973af1df
commit
2b724509b9
1 changed files with 9 additions and 2 deletions
|
@ -164,8 +164,15 @@ def revert_tag(repo_obj, tag_name, docker_image_id):
|
||||||
|
|
||||||
def store_tag_manifest(namespace, repo_name, tag_name, docker_image_id, manifest_digest,
|
def store_tag_manifest(namespace, repo_name, tag_name, docker_image_id, manifest_digest,
|
||||||
manifest_data):
|
manifest_data):
|
||||||
tag = create_or_update_tag(namespace, repo_name, tag_name, docker_image_id)
|
with db_transaction():
|
||||||
return TagManifest.create(tag=tag, digest=manifest_digest, json_data=manifest_data)
|
tag = create_or_update_tag(namespace, repo_name, tag_name, docker_image_id)
|
||||||
|
|
||||||
|
try:
|
||||||
|
manifest = TagManifest.get(digest=manifest_digest)
|
||||||
|
manifest.tag = tag
|
||||||
|
manifest.save()
|
||||||
|
except TagManifest.DoesNotExist:
|
||||||
|
return TagManifest.create(tag=tag, digest=manifest_digest, json_data=manifest_data)
|
||||||
|
|
||||||
|
|
||||||
def _get_active_tag(namespace, repo_name, tag_name):
|
def _get_active_tag(namespace, repo_name, tag_name):
|
||||||
|
|
Reference in a new issue