Skip to content

Commit 534f98d

Browse files
author
Alan Christie
committed
feat: Add get_image() to decoder
1 parent 9dab70e commit 534f98d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

decoder/decoder.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,13 @@ def get_inputs(job_definition: Dict[str, Any]) -> Optional[Dict[str, Any]]:
339339
return job_definition.get("variables", {}).get("inputs", {}).get("properties", {})
340340

341341

342+
def get_image(job_definition: Dict[str, Any]) -> Tuple[str, str]:
343+
"""Given a Job Definition this function returns the image name and tag."""
344+
image_name: str = str(job_definition.get("image", {}).get("name", ""))
345+
image_tag: str = str(job_definition.get("image", {}).get("tag", ""))
346+
return image_name, image_tag
347+
348+
342349
def decode(
343350
template_text: str,
344351
variable_map: Optional[Dict[str, str]],

0 commit comments

Comments
 (0)