Skip to content

Commit faffa51

Browse files
Michal Galkamgalka
Michal Galka
authored andcommitted
kci_docker: Enable adding version to image tag
Introduce --image-version/-V to specify image version which will be added at the end of the image tag. Signed-off-by: Michal Galka <[email protected]>
1 parent 25dd039 commit faffa51

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

config/docker/kci_docker

+5
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ def _dump_push_log(log):
7474
def main(args):
7575
base_name = args.prefix + args.image
7676
tag_strings = ([args.arch] if args.arch else []) + (args.fragment or [])
77+
if args.image_version:
78+
tag_strings.append(args.image_version)
7779
tag_name = '-'.join(tag_strings)
80+
7881
name = ':'.join((base_name, tag_name)) if tag_name else base_name
7982
if args.command == 'name':
8083
print(name)
@@ -123,6 +126,8 @@ if __name__ == '__main__':
123126
help="Docker image name, e.g. gcc-10:x86")
124127
parser.add_argument('--prefix', default='kernelci/',
125128
help="Docker image tag prefix")
129+
parser.add_argument('--image-version', '-V',
130+
help='Docker image version tag e.g. 20221011.0')
126131
parser.add_argument('--arch',
127132
help="CPU architecture, e.g. x86")
128133
parser.add_argument('--fragment', action='append',

0 commit comments

Comments
 (0)