Skip to content

Commit

Permalink
Merge pull request #8433 from Malizor/devel
Browse files Browse the repository at this point in the history
Expose the SCM Branch name in the playbook environment

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
  • Loading branch information
softwarefactory-project-zuul[bot] committed Oct 23, 2020
2 parents 02fa852 + a58e37e commit d550487
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions awx/main/models/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,10 @@ def awx_meta_vars(self):
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.scm_branch:
for name in ('awx', 'tower'):
r['{}_job_scm_branch'.format(name)] = self.scm_branch
if self.job_template:
for name in ('awx', 'tower'):
r['{}_job_template_id'.format(name)] = self.job_template.pk
Expand Down

0 comments on commit d550487

Please sign in to comment.