This is the current code and I am trying to wrap my head around an alternative:
Presently we have:
URL_PREFIX = "http://ourrepo:8081/artifactory"
pattern = re.compile(r'^.*-(ngwebui|nodeservice).*$')
if pattern.match(artifact):
return URL_PREFIX + "/npm-local/region/%s/-/region/%s-%s" % (artifact, artifact, version)
else:
return URL_PREFIX + "/libs-releases-local/org/region/%s/%s/%s-%s" % (artifact, version, artifact, version)
What I want to do is incorporate another type called "dockerservice" into this with a URL_PREFIX value via of
URL_PREFIX + "/docker-dev-local/%s-%s" % (artifact, artifact, version)
What would be the simplest way to retain the last catch all with an if ngwebui|nodeservice URL_PREFIX, dockerservice URL_PREFIX, else URL_PREFIX:
?