Add data migration to convert cloudforms scripts to SCM

This commit is contained in:
AlanCoding
2020-05-14 14:36:49 -04:00
parent b0ff763a0b
commit 71cf3198d8
4 changed files with 66 additions and 1 deletions
+4 -1
View File
@@ -2167,7 +2167,10 @@ class RunProjectUpdate(BaseTask):
scm_branch = project_update.scm_branch
branch_override = bool(scm_branch and project_update.scm_branch != project_update.project.scm_branch)
if project_update.job_type == 'run' and (not branch_override):
scm_branch = project_update.project.scm_revision
if project_update.project.scm_revision:
scm_branch = project_update.project.scm_revision
elif not scm_branch:
raise RuntimeError('Could not determine a revision to run from project.')
elif not scm_branch:
scm_branch = {'hg': 'tip'}.get(project_update.scm_type, 'HEAD')
extra_vars.update({