~canonical-ci-engineering/ci-core-jenkins/trunk

« back to all changes in this revision

Viewing changes to workers/get_latest_image_version/__init__.py

  • Committer: Ubuntu CI Bot
  • Author(s): Parameswaran Sivatharman
  • Date: 2015-06-05 13:56:34 UTC
  • mfrom: (13.2.5 trigger-per-channel)
  • Revision ID: ubuntu_ci_bot-20150605135634-hvclgjyq0r021am2
To get the latest image information from the right url [r=Parameswaran Sivatharman]

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        description='Core image watcher ...')
39
39
    parser.add_argument('-c', '--conf', default='core-jenkins-service.conf',
40
40
                        help='Configuration file path')
 
41
    parser.add_argument('--channel', required=True,
 
42
                        choices=['rolling_edge', '15.04_edge'],
 
43
                        help='Which channel image to be tested')
 
44
 
41
45
    args = parser.parse_args()
42
46
 
43
47
    # Load configuration options.
44
48
    config = configparser.ConfigParser()
45
49
    config.read(args.conf)
46
 
    url = config.get('image', 'url')
 
50
 
 
51
    url = config.get(args.channel, 'url')
 
52
 
47
53
    latest_image_version = _read_index_json_file(url)
48
54
 
49
55
    print(latest_image_version)