fixing bugs with ci pipeline

This commit is contained in:
GotthardG 2024-12-16 22:57:34 +01:00
parent 0178de96fd
commit 9c293dd8d4

View File

@ -104,6 +104,16 @@ if __name__ == "__main__":
key_path = "ssl/key.pem"
host = "127.0.0.1"
print("Running in CI mode with self-signed certificates...")
# Ensure SSL certificate and key are generated
if is_ci or environment == "dev":
Path("ssl").mkdir(exist_ok=True)
if not Path(cert_path).exists() or not Path(key_path).exists():
print(
f"Generating self-signed SSL certificate"
f"at {cert_path} and {key_path}"
)
ssl_heidi.generate_self_signed_cert(cert_path, key_path)
elif environment == "test":
cert_path = "ssl/mx-aare-test.psi.ch.pem"
key_path = "ssl/mx-aare-test.psi.ch.key"