From b039d7772cfc3f8f24b105428d2a1262d428197f Mon Sep 17 00:00:00 2001 From: Ian Norton Date: Tue, 2 Aug 2022 19:40:30 +0100 Subject: [PATCH 1/2] Use system carts if they are visible --- emulator/gitlabemu/gitlab_client_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/emulator/gitlabemu/gitlab_client_api.py b/emulator/gitlabemu/gitlab_client_api.py index d179c9e..bc868c3 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() -- GitLab From 9f9d0316bf29ed1d855153d8a0653acd2a9a3c2e Mon Sep 17 00:00:00 2001 From: Ian Norton Date: Tue, 2 Aug 2022 19:43:59 +0100 Subject: [PATCH 2/2] Bump to 1.1.3 --- emulator/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emulator/setup.py b/emulator/setup.py index 9a78442..1006b2f 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", -- GitLab