Expose {awx,tower}_project_scm_branch variables in the environment

This commit is contained in:
Nicolas Delvaux 2020-10-21 23:52:06 +02:00
parent 81a79c30cb
commit 51aed19b29

View File

@ -798,6 +798,7 @@ class Job(UnifiedJob, JobOptions, SurveyJobMixin, JobNotificationMixin, TaskMana
if self.project:
for name in ('awx', 'tower'):
r['{}_project_revision'.format(name)] = self.project.scm_revision
r['{}_project_scm_branch'.format(name)] = self.project.scm_branch
if self.job_template:
for name in ('awx', 'tower'):
r['{}_job_template_id'.format(name)] = self.job_template.pk