-
Notifications
You must be signed in to change notification settings - Fork 1
/
instruqt_update.py
36 lines (31 loc) · 1.17 KB
/
instruqt_update.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import logging
import logging.handlers
import lib.parse_args as parse_args
import lib.update_image_name as update_image_name
import lib.push_labs as push_labs
logger = logging.getLogger(__name__)
def main():
"""This script will do each of the following separately:
1. Check to see which instruqt labs are out of date.
2. Update the image for instruqt labs specified in the config/config.yml.
3. Push labs to instruqt.
"""
logger.info('Starting.')
if check_labs:
update_image_name.UpdateImageName(config).createchecklist()
elif modify_labs:
update_image_name.UpdateImageName(config).UpdateImageNames()
elif push:
push_labs.PushLabs(config)
elif list_labs:
update_image_name.UpdateImageName(config).createlablist()
elif pull_labs:
push_labs.PullLabs(config)
elif arb_push:
push_labs.ArbitraryPush(config)
else:
logger.info('No options specified. Please run "python Instruqtupdate -h" for more information.')
logger.info('Completed.')
if __name__ == '__main__':
config, check_labs, modify_labs, push, list_labs, pull_labs, arb_push = parse_args.parse_arguments()
main()