-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathgithub.py
52 lines (40 loc) · 1.29 KB
/
github.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from invoke import task
from .libs.github_actions_tools import download_artifacts, follow_workflow_run, trigger_macos_workflow
from .utils import DEFAULT_BRANCH, load_release_versions
@task
def trigger_macos_build(
ctx,
datadog_agent_ref=DEFAULT_BRANCH,
release_version="nightly-a7",
major_version="7",
python_runtimes="3",
destination=".",
):
env = load_release_versions(ctx, release_version)
github_action_ref = env["MACOS_BUILD_VERSION"]
run_id = trigger_macos_workflow(
workflow="macos.yaml",
github_action_ref=github_action_ref,
datadog_agent_ref=datadog_agent_ref,
release_version=release_version,
major_version=major_version,
python_runtimes=python_runtimes,
)
follow_workflow_run(run_id)
download_artifacts(run_id, destination)
@task
def trigger_macos_test(
ctx,
datadog_agent_ref=DEFAULT_BRANCH,
release_version="nightly-a7",
python_runtimes="3",
):
env = load_release_versions(ctx, release_version)
github_action_ref = env["MACOS_BUILD_VERSION"]
run_id = trigger_macos_workflow(
workflow="test.yaml",
github_action_ref=github_action_ref,
datadog_agent_ref=datadog_agent_ref,
python_runtimes=python_runtimes,
)
follow_workflow_run(run_id)