If the yaml has
wait-for-package: true
then block and poll for the packages to appear if they are not already
there. This is only useful for new branches or explicit sha1's, obviously.
Signed-off-by: Sage Weil <sage@inktank.com>
'wget', '-q', '-O-', base_url + '/version',
],
stdout=StringIO(),
+ check_status=False,
)
+ if r.exitstatus != 0:
+ if config.get('wait_for_package'):
+ log.info('Package not there yet, waiting...')
+ time.sleep(15)
+ continue
+ raise Exception('failed to fetch package version from %s' %
+ base_url + '/version')
version = r.stdout.getvalue().strip()
log.info('Package version is %s', version)
break