adding hook for custom script
adding env var DEVSTACK_GATE_CUSTOM_SCRIPT. if set, then update-image.py will upload the script specified and run it after all other configuration and preparation is complete, just before taking a snapshot of the image. Change-Id: I319a8f8dc4fa1de642b467b4504dca64c5290a29
This commit is contained in:
@@ -183,6 +183,12 @@ def configure_server(server, branches):
|
||||
client.ssh('clone %s' % project,
|
||||
'cd ~/workspace && git clone https://review.openstack.org/p/%s' % project)
|
||||
|
||||
script = os.environ.get('DEVSTACK_GATE_CUSTOM_SCRIPT', '')
|
||||
if script and os.path.isfile(script):
|
||||
bn = os.path.basename(script)
|
||||
client.scp(script, '/tmp/%s' % bn)
|
||||
client.ssh('run custom script %s' % bn,
|
||||
'chmod +x /tmp/%s && /tmp/%s' % (bn, bn))
|
||||
|
||||
def snapshot_server(client, server, name):
|
||||
print 'Saving image'
|
||||
|
||||
Reference in New Issue
Block a user