Skip to content

Commit

Permalink
some info added
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsanfal committed Mar 6, 2024
1 parent 8d7e773 commit 6513c14
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions conan/internal/runner/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ def run(self):
print(e)
finally:
if self.container:
docker_info('Stopping container')
self.container.stop()
if self.remove:
docker_info('Removing container')
self.container.remove()

def build_image(self):
Expand Down Expand Up @@ -123,6 +125,10 @@ def create_runner_environment(self):
if self.cache in ['clean', 'copy']:
shutil.rmtree(self.abs_runner_home_path, ignore_errors=True)
os.mkdir(self.abs_runner_home_path)
for file_name in ['global.conf', 'settings.yml', 'remotes.json']:
src_file = os.path.join(ConfigAPI(self.conan_api).home(), file_name)
if os.path.exists(src_file):
shutil.copy(src_file, os.path.join(self.abs_runner_home_path, file_name))
shutil.copytree(os.path.join(ConfigAPI(self.conan_api).home(), 'profiles'),
os.path.join(self.abs_runner_home_path, 'profiles'))
if self.cache == 'copy':
Expand All @@ -135,6 +141,9 @@ def init_container(self):
if self.cache != 'shared':
self.run_command('mkdir -p ${HOME}/.conan2/profiles', log=False)
self.run_command('cp -r '+self.abs_docker_path+'/.conanrunner/profiles/. ${HOME}/.conan2/profiles/.', log=False)
for file_name in ['global.conf', 'settings.yml', 'remotes.json']:
if os.path.exists( os.path.join(self.abs_runner_home_path, file_name)):
self.run_command('cp '+self.abs_docker_path+f'/.conanrunner/{file_name} ${HOME}/.conan2/{file_name}', log=False)
if self.cache in ['copy', 'clean']:
self.run_command('conan cache restore '+self.abs_docker_path+'/.conanrunner/conan_cache_save.tgz')

Expand Down

0 comments on commit 6513c14

Please sign in to comment.