mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Pr is not defined
This commit is contained in:
parent
41f3b0d986
commit
e855952d50
1 changed files with 15 additions and 16 deletions
31
tools/ci.py
31
tools/ci.py
|
@ -1514,7 +1514,10 @@ def workflow_config(
|
|||
full = False
|
||||
gh_event_path = os.environ.get("GITHUB_EVENT_PATH") or None
|
||||
gh_event = None
|
||||
if gh_event_path is not None:
|
||||
ctx.info(f"Github event path is {gh_event_path}")
|
||||
if gh_event_path is None:
|
||||
labels = []
|
||||
else:
|
||||
try:
|
||||
gh_event = json.loads(open(gh_event_path, encoding="utf-8").read())
|
||||
except Exception as exc:
|
||||
|
@ -1523,6 +1526,17 @@ def workflow_config(
|
|||
)
|
||||
ctx.exit(1)
|
||||
|
||||
if "pull_request" not in gh_event:
|
||||
ctx.warn("The 'pull_request' key was not found on the event payload.")
|
||||
ctx.exit(1)
|
||||
|
||||
pr = gh_event["pull_request"]["number"]
|
||||
labels = _get_pr_test_labels_from_event_payload(gh_event)
|
||||
|
||||
ctx.info(f"{'==== labels ====':^80s}")
|
||||
ctx.info(f"{pprint.pformat(labels)}")
|
||||
ctx.info(f"{'==== end labels ====':^80s}")
|
||||
|
||||
ctx.info(f"{'==== github event ====':^80s}")
|
||||
ctx.info(f"{pprint.pformat(gh_event)}")
|
||||
ctx.info(f"{'==== end github event ====':^80s}")
|
||||
|
@ -1544,21 +1558,6 @@ def workflow_config(
|
|||
|
||||
kinds = ["linux", "windows", "macos"]
|
||||
|
||||
# If there is no arm runner disable arm64
|
||||
if os.environ.get("LINUX_ARM_RUNNER", "0") == "0":
|
||||
jobs.update(
|
||||
{
|
||||
_.job_name: (True if _.arch != "arm64" else False)
|
||||
for _ in TEST_SALT_LISTING["linux"] # type: ignore
|
||||
}
|
||||
)
|
||||
jobs.update(
|
||||
{
|
||||
_.job_name: (True if _.arch != "arm64" else False)
|
||||
for _ in TEST_SALT_PKG_LISTING["linux"] # type: ignore
|
||||
}
|
||||
)
|
||||
|
||||
if skip_pkg_download_tests:
|
||||
jobs["test-pkg-download"] = False
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue