INNER CODE UNIT · Python
priority
lissy93/portainer-templates · lib/combine.py:103
priority = 0 if is_local else rank.get(file, len(rank) + 1)
for t in source_templates:
t['_source'] = file
t['_priority'] = priority
templates += source_templates
return templates
VALID_ENV_KEYS = {'name', 'label', 'description', 'default', 'preset', 'select'}
def is_uri(value):
return isinstance(value, str) and FORMAT_CHECKER.conforms(value, 'uri')
STACKFILE_URL_PATTERNS = [
(r'https://raw\.githubusercontent\.com/([^/]+/[^/]+)/[^/]+/(.+)', 'github.com'),
(r'https://github\.com/([^/]+/[^/]+)/(?:blob|raw)/[^/]+/(.+)', 'github.com'),
(r'https://gitlab\.com/(.+?)/-/(?:blob|raw)/[^/]+/(.+)', 'gitlab.com'),
]