Fix project folder deletion

Fix another absolute path reference in containers
This commit is contained in:
Alan Rominger
2020-09-04 07:50:21 -04:00
committed by Shane McDonald
parent 64f45da4d2
commit 9660e27246
2 changed files with 4 additions and 4 deletions

View File

@@ -1038,6 +1038,8 @@ class BaseTask(object):
results_dir = os.path.join(private_data_dir, 'artifacts/playbook_profiling')
if not os.path.isdir(results_dir):
os.makedirs(results_dir, stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC)
# FIXME: develop some better means of referencing paths inside containers
container_results_dir = os.path.join('/runner', 'artifacts/playbook_profiling')
logger.debug('Collected the following resource profiling intervals: cpu: {} mem: {} pid: {}'
.format(cpu_poll_interval, mem_poll_interval, pid_poll_interval))
@@ -1047,7 +1049,7 @@ class BaseTask(object):
'resource_profiling_cpu_poll_interval': cpu_poll_interval,
'resource_profiling_memory_poll_interval': mem_poll_interval,
'resource_profiling_pid_poll_interval': pid_poll_interval,
'resource_profiling_results_dir': results_dir})
'resource_profiling_results_dir': container_results_dir})
return resource_profiling_params

View File

@@ -24,9 +24,7 @@
tasks:
- name: delete project directory before update
file:
path: "{{project_path|quote}}"
state: absent
command: "rm -rf {{project_path}}/*" # volume mounted, cannot delete folder itself
tags:
- delete