Skip to content

Commit

Permalink
Add in a check for jenkins build url envar
Browse files Browse the repository at this point in the history
This will give CI users additional context where AT-based workflows are originating.
  • Loading branch information
JacobCallahan committed Aug 5, 2022
1 parent 80f92d5 commit 08ded46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions broker/providers/ansible_tower.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import click
import inspect
import json
import os
import yaml
from urllib import parse as url_parser
from functools import cached_property
Expand Down Expand Up @@ -417,6 +418,8 @@ def execute(self, **kwargs):
subject = "workflow"
get_path = self.v2.workflow_job_templates
kwargs["_broker_origin"] = find_origin()
if (jenkins_url := os.environ.get("BUILD_URL")):
kwargs["_jenkins_url"] = jenkins_url
elif name := kwargs.get("job_template"):
subject = "job_template"
get_path = self.v2.job_templates
Expand Down

0 comments on commit 08ded46

Please sign in to comment.