diff --git a/emulator/gitlabemu/gitlab_client_api.py b/emulator/gitlabemu/gitlab_client_api.py index d179c9e0c32c5706c939bec13ab5c740b669a5a5..bc868c3b5261ad2b61e6bc5490eaa982b9d6e295 100644 --- a/emulator/gitlabemu/gitlab_client_api.py +++ b/emulator/gitlabemu/gitlab_client_api.py @@ -24,6 +24,7 @@ from .userconfig import get_user_config_context GITLAB_SERVER_ENV = "GLE_GITLAB_SERVER" GITLAB_PROJECT_ENV = "GLE_GITLAB_PROJECT" +SYSTEM_CA_CERTS = "/etc/ssl/certs/ca-certificates.crt" class GitlabIdent: @@ -212,8 +213,10 @@ def get_ca_bundle() -> str: if bundle and os.path.isfile(bundle): note(f"Using extra CAs from {env} in {bundle}") bundles.append(bundle) - certs = certifi.contents() + if os.path.exists(SYSTEM_CA_CERTS) and not os.path.samefile(SYSTEM_CA_CERTS, certifi.where()): + with open(SYSTEM_CA_CERTS, "r") as etc_certs: + certs += etc_certs.read() for bundle in bundles: with open(bundle, "r") as data: certs += data.read() diff --git a/emulator/setup.py b/emulator/setup.py index 9a78442990cf71b335cb00b883f67468f2d8995d..1006b2f556ecd020878b72d33f7fae560d2b3643 100644 --- a/emulator/setup.py +++ b/emulator/setup.py @@ -1,6 +1,6 @@ from distutils.core import setup -VERSION = "1.1.2" +VERSION = "1.1.3" requirements = [ "pyyaml>=5.1", @@ -16,7 +16,7 @@ requirements.extend([f"docker>=5.0.3; platform_system=='{p}'" for p in ["Darwin" setup( name="gitlab-emulator", version=VERSION, - description="Run a subset of .gitlab-ci.yml jobs locally", + description="Run/Inspect a .gitlab-ci.yml jobs and pipelines locally", author="Ian Norton", author_email="inorton@gmail.com", url="https://gitlab.com/cunity/gitlab-emulator",