|
9 | 9 | # Note: Run this file with `hatch run`, `pipx run`, or `uv run`.
|
10 | 10 | from __future__ import annotations
|
11 | 11 |
|
12 |
| -import os |
13 |
| -import sys |
14 | 12 | from itertools import product
|
15 |
| -from pathlib import Path |
16 | 13 |
|
17 | 14 | from shrub.v3.evg_build_variant import BuildVariant
|
18 |
| -from shrub.v3.evg_command import FunctionCall |
19 |
| -from shrub.v3.evg_project import EvgProject |
20 |
| -from shrub.v3.evg_task import EvgTask, EvgTaskRef |
21 |
| -from shrub.v3.shrub_service import ShrubService |
| 15 | +from shrub.v3.evg_task import EvgTaskRef |
22 | 16 |
|
23 | 17 | # Top level variables.
|
24 | 18 | ALL_VERSIONS = ["4.0", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"]
|
@@ -80,58 +74,11 @@ def get_python_binary(python, host):
|
80 | 74 | raise ValueError(f"no match found for {python} on {host}")
|
81 | 75 |
|
82 | 76 |
|
83 |
| -def write_output(project: EvgProject, target: str) -> str: |
84 |
| - HERE = Path(__file__).resolve().parent |
85 |
| - with open(HERE.parent / "generated_configs" / target, "w") as fid: |
86 |
| - fid.write(ShrubService.generate_yaml(project)) |
87 |
| - |
88 |
| - |
89 | 77 | ##############
|
90 | 78 | # OCSP
|
91 | 79 | ##############
|
92 | 80 |
|
93 |
| - |
94 |
| -def create_ocsp_task(file_name, server_type): |
95 |
| - algo = file_name.split("-")[0] |
96 |
| - |
97 |
| - # Create ocsp server call. |
98 |
| - vars = dict(OCSP_ALGORITHM=algo, SERVER_TYPE=server_type) |
99 |
| - server_func = FunctionCall(func="run-ocsp-server", vars=vars) |
100 |
| - |
101 |
| - # Create bootstrap function call. |
102 |
| - vars = dict(ORCHESTRATION_FILE=file_name) |
103 |
| - bootstrap_func = FunctionCall(func="bootstrap mongo-orchestration", vars=vars) |
104 |
| - |
105 |
| - # Create test function call. |
106 |
| - should_succeed = "true" if "valid" in server_type else "false" |
107 |
| - vars = dict(OCSP_ALGORITHM=algo, OCSP_TLS_SHOULD_SUCCEED=should_succeed) |
108 |
| - test_func = FunctionCall(func="run tests", vars=vars) |
109 |
| - |
110 |
| - # Handle tags. |
111 |
| - tags = ["ocsp", f"ocsp-{algo}"] |
112 |
| - if "mustStaple" in file_name: |
113 |
| - tags.append("ocsp-staple") |
114 |
| - |
115 |
| - # Create task. |
116 |
| - name = file_name.replace(".json", "") |
117 |
| - task_name = f"test-ocsp-{server_type}-{name}" |
118 |
| - commands = [server_func, bootstrap_func, test_func] |
119 |
| - return EvgTask(name=task_name, tags=tags, commands=commands) |
120 |
| - |
121 |
| - |
122 |
| -tasks = [] |
123 |
| - |
124 |
| -# Create OCSP tasks. |
125 |
| -if not os.environ.get("DRIVERS_TOOLS"): |
126 |
| - print("Set DRIVERS_TOOLS environment variable!") # noqa: T201 |
127 |
| - sys.exit(1) |
128 |
| -config = Path(os.environ["DRIVERS_TOOLS"]) / ".evergreen/orchestration/configs/servers" |
129 |
| -for path in config.glob("*ocsp*"): |
130 |
| - for server_type in ["valid", "revoked", "valid-delegate", "revoked-delegate"]: |
131 |
| - task = create_ocsp_task(path.name, server_type) |
132 |
| - tasks.append(task) |
133 |
| - |
134 |
| -# Create build variants. |
| 81 | +# Create OCSP build variants. |
135 | 82 | variants = []
|
136 | 83 |
|
137 | 84 | # OCSP tests on rhel8 with rotating CPython versions.
|
@@ -174,5 +121,4 @@ def create_ocsp_task(file_name, server_type):
|
174 | 121 |
|
175 | 122 | # Generate OCSP config.
|
176 | 123 | # project = EvgProject(tasks=None, buildvariants=variants)
|
177 |
| -# write_output(project, "ocsp.yaml") |
178 | 124 | # print(ShrubService.generate_yaml(project))
|
0 commit comments