v31.1-roots.1 · Commit 11: [PATCH 11/17] fix(test): bound policy oracles and retain CI diagnostics
ci/test/02_run_container.py
Before: ci/test/02_run_container.py · After: ci/test/02_run_container.py
File metadata
index 63673e03a34e96119247c0e8a312f0df9e069590..6a0d62e59d6eb28fca4a2b9794221821a98a19b1 100755
Download original patch · Release notes
Diff rows 1–20 of 20. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
ci/test/02_run_container.py
CHANGED
|
@@ -92,6 +92,13 @@ def main():
|
|
|
92
92
|
CI_DEPENDS_SOURCES_MOUNT = f"type=volume,src={os.environ['CONTAINER_NAME']}_depends_sources,dst={os.environ['DEPENDS_DIR']}/sources"
|
|
93
93
|
CI_PREVIOUS_RELEASES_MOUNT = f"type=volume,src={os.environ['CONTAINER_NAME']}_previous_releases,dst={os.environ['PREVIOUS_RELEASES_DIR']}"
|
|
94
94
|
CI_BUILD_MOUNT = []
|
|
95
|
+
CI_ARTIFACTS_MOUNT = []
|
|
96
|
+
if os.getenv("ROOTS_ARTIFACTS_DIR"):
|
|
97
|
+
artifacts = Path(os.environ["ROOTS_ARTIFACTS_DIR"])
|
|
98
|
+
if not artifacts.is_absolute():
|
|
99
|
+
sys.exit("ROOTS_ARTIFACTS_DIR must be an absolute host/guest path")
|
|
100
|
+
artifacts.mkdir(parents=True, exist_ok=True)
|
|
101
|
+
CI_ARTIFACTS_MOUNT = [f"--mount=type=bind,src={artifacts},dst={artifacts}"]
|
|
95
102
|
|
|
96
103
|
if os.getenv("DANGER_CI_ON_HOST_FOLDERS"):
|
|
97
104
|
# ensure the directories exist
|
|
@@ -143,6 +150,7 @@ def main():
|
|
|
143
150
|
f"--mount={CI_DEPENDS_SOURCES_MOUNT}",
|
|
144
151
|
f"--mount={CI_PREVIOUS_RELEASES_MOUNT}",
|
|
145
152
|
*CI_BUILD_MOUNT,
|
|
153
|
+
*CI_ARTIFACTS_MOUNT,
|
|
146
154
|
f"--env-file={env_file}",
|
|
147
155
|
f"--name={os.environ['CONTAINER_NAME']}",
|
|
148
156
|
"--network=ci-ip6net",
|