Build de l'image de base + execution build.py dans le conteneur

This commit is contained in:
2017-01-25 14:49:30 +01:00
parent ce05d9a339
commit 38d236e09b
6 changed files with 52 additions and 9 deletions

3
lib/build.py Normal file
View File

@ -0,0 +1,3 @@
if __name__ == '__main__':
print('Test')

View File

@ -29,7 +29,7 @@ def find_image_by_name(name_pattern, rkt_flags = []):
return None
def export_image(image_id, dest_file, rkt_flags = []):
output = run([
run([
"image",
"export",
image_id,

View File

@ -6,11 +6,15 @@ def run_profile_hooks(profile, step, cwd=None, env=None):
step_hooks = profile[step]["hooks"].split(",")
for hook_name in step_hooks:
hook_path = os.path.join(hooks_dir, hook_name)
print(hook_path)
subprocess.call(hook_path, cwd=cwd, stdin=subprocess.PIPE, env=env)
def get_hooks_dir():
return os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + "/../hooks")
def get_lib_dir():
return os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + "/../lib")
def load_profile(profile_name):
profile_filename = profile_name+".conf"
for profile_file in get_available_profiles():