Skip to content

Commit 9c0c060

Browse files
committed
produce just the variants
1 parent 486e95e commit 9c0c060

File tree

1 file changed

+2
-56
lines changed

1 file changed

+2
-56
lines changed

.evergreen/scripts/generate_config.py

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@
99
# Note: Run this file with `hatch run`, `pipx run`, or `uv run`.
1010
from __future__ import annotations
1111

12-
import os
13-
import sys
1412
from itertools import product
15-
from pathlib import Path
1613

1714
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
2216

2317
# Top level variables.
2418
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):
8074
raise ValueError(f"no match found for {python} on {host}")
8175

8276

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-
8977
##############
9078
# OCSP
9179
##############
9280

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.
13582
variants = []
13683

13784
# OCSP tests on rhel8 with rotating CPython versions.
@@ -174,5 +121,4 @@ def create_ocsp_task(file_name, server_type):
174121

175122
# Generate OCSP config.
176123
# project = EvgProject(tasks=None, buildvariants=variants)
177-
# write_output(project, "ocsp.yaml")
178124
# print(ShrubService.generate_yaml(project))

0 commit comments

Comments
 (0)