Skip to content

Commit 24a4448

Browse files
author
Alan Christie
committed
feat: Add --image-tag
1 parent b2beb59 commit 24a4448

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/jote/jote.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,11 @@ def _test(
401401
tests_ignored: int = 0
402402
tests_failed: int = 0
403403

404-
job_image: str = f"{job_definition.image.name}:{job_definition.image.tag}"
404+
if args.image_tag:
405+
print(f"W Replacing image tag. Using '{args.image_tag}'")
406+
job_image: str = f"{job_definition.image.name}:{args.image_tag}"
407+
else:
408+
job_image = f"{job_definition.image.name}:{job_definition.image.tag}"
405409
job_image_memory: str = job_definition.image["memory"]
406410
if job_image_memory is None:
407411
job_image_memory = "1Gi"
@@ -763,6 +767,10 @@ def main() -> int:
763767
" that match the collection will be"
764768
" candidates for testing.",
765769
)
770+
arg_parser.add_argument(
771+
"--image-tag",
772+
help="An image tag to use rather then the one defined in the job definition.",
773+
)
766774
arg_parser.add_argument(
767775
"-t",
768776
"--test",

0 commit comments

Comments
 (0)