SSH for Jenkins

This commit is contained in:
Benjamin Bohard 2020-09-02 15:48:05 +02:00
parent 5a4c17a959
commit 9a46f34f73
3 changed files with 7 additions and 1 deletions

View File

@ -18,6 +18,9 @@ def get_hooks_dir():
def get_lib_dir():
return os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + "/../lib")
def get_utils_dir():
return os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + "/../utils")
def load_profile(profile_name, debug=False):
profile_filename = profile_name+".conf"
for profile_file in get_available_profiles():

View File

@ -80,6 +80,8 @@ if __name__ == "__main__":
pid = os.getpid()
build_workspace = tamarin.get_workspace_subdir('tmp/build_{:d}'.format(pid))
shutil.copytree(tamarin.get_utils_dir(), os.path.join(build_workspace, 'utils'))
base_image = args.base if args.base != '' else profile['profile']['default_image']
image_tag = build_image(build_workspace, base_image, args.profile, profile, debug=args.debug, rebuild=args.rebuild)
@ -107,7 +109,8 @@ if __name__ == "__main__":
"-v", "{:s}:/dist".format(output_dir),
"-v", "{:s}:/tamarin/hooks:ro".format(tamarin.get_hooks_dir()),
"-v", "{:s}:/tamarin/lib:ro".format(tamarin.get_lib_dir()),
"-v", "{:s}:/tamarin/profiles:ro".format(tamarin.get_profiles_dir())
"-v", "{:s}:/tamarin/profiles:ro".format(tamarin.get_profiles_dir()),
"-v", "{:s}:/tamarin/utils:ro".format(tamarin.get_utils_dir())
]
# Use environment proxy if defined