Skip to content
Snippets Groups Projects
Commit f09ff803 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #8475: Use LOFAR_TAG as default docker tag if none specified in softwareVersion key

parent 32a5215b
No related branches found
No related tags found
No related merge requests found
...@@ -190,10 +190,22 @@ class Parset(dict): ...@@ -190,10 +190,22 @@ class Parset(dict):
def defaultDockerImage(): def defaultDockerImage():
return runCommand("docker-template", "lofar-pipeline:${LOFAR_TAG}") return runCommand("docker-template", "lofar-pipeline:${LOFAR_TAG}")
@staticmethod
def defaultDockerTag():
return runCommand("docker-template", "${LOFAR_TAG}")
def dockerImage(self): def dockerImage(self):
# Return the version set in the parset, and fall back to our own version. # Return the version set in the parset, and fall back to our own version.
return (self[PARSET_PREFIX + "Observation.ObservationControl.PythonControl.softwareVersion"] or image = self[PARSET_PREFIX + "Observation.ObservationControl.PythonControl.softwareVersion"]
self.defaultDockerImage())
if not image:
return self.defaultDockerImage()
if ":" in image:
return image
# Insert our tag by default
return "%s:%s" % (image, self.defaultDockerTag())
def otdbId(self): def otdbId(self):
return int(self[PARSET_PREFIX + "Observation.otdbID"]) return int(self[PARSET_PREFIX + "Observation.otdbID"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment