From eb5bf599e3b9d6debeea8d1b1485595ba60f6a64 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Tue, 15 Dec 2020 13:29:03 -0500 Subject: [PATCH] Fix raw archive project updates Several squashed commits Fix git bug introduced by setting remote tmp in project path change shebang back to py3 again Revert shebang change --- awx/main/tasks.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 8182bd64cf..9ffcad4393 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -2231,6 +2231,14 @@ class RunProjectUpdate(BaseTask): elif project_update.project.allow_override: # If branch is override-able, do extra fetch for all branches extra_vars['scm_refspec'] = 'refs/heads/*:refs/remotes/origin/*' + + if project_update.scm_type == 'archive': + # for raw archive, prevent error moving files between volumes + extra_vars['ansible_remote_tmp'] = os.path.join( + project_update.get_project_path(check_if_exists=False), + '.ansible_awx', 'tmp' + ) + self._write_extra_vars_file(private_data_dir, extra_vars) def build_cwd(self, project_update, private_data_dir):