parent
640012103c
commit
0fe3e6510a
5 changed files with 41 additions and 5 deletions
|
@ -8,6 +8,7 @@ from data import model
|
|||
from data.database import db
|
||||
from auth.auth_context import get_authenticated_user
|
||||
from endpoints.notificationhelper import spawn_notification
|
||||
from util.names import escape_tag
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -160,7 +161,7 @@ class PreparedBuild(object):
|
|||
if self._tags:
|
||||
raise Exception('Property tags already set')
|
||||
|
||||
self._tags = list(value)
|
||||
self._tags = [escape_tag(tag, default='latest') for tag in value]
|
||||
|
||||
@property
|
||||
def build_name(self):
|
||||
|
|
|
@ -24,6 +24,7 @@ from endpoints.v2.errors import (BlobUnknown, ManifestInvalid, ManifestUnknown,
|
|||
from endpoints.trackhelper import track_and_log
|
||||
from endpoints.notificationhelper import spawn_notification
|
||||
from util.registry.replication import queue_storage_replication
|
||||
from util.names import VALID_TAG_PATTERN
|
||||
from digest import digest_tools
|
||||
from data import model
|
||||
from data.database import RepositoryTag
|
||||
|
@ -31,8 +32,6 @@ from data.database import RepositoryTag
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
VALID_TAG_PATTERN = r'[\w][\w.-]{0,127}'
|
||||
|
||||
BASE_MANIFEST_ROUTE = '/<repopath:repository>/manifests/<regex("{0}"):manifest_ref>'
|
||||
MANIFEST_DIGEST_ROUTE = BASE_MANIFEST_ROUTE.format(digest_tools.DIGEST_PATTERN)
|
||||
MANIFEST_TAGNAME_ROUTE = BASE_MANIFEST_ROUTE.format(VALID_TAG_PATTERN)
|
||||
|
|
Reference in a new issue