From 2eab408539fdc1e6c531d59c81c6e2ce43ae7639 Mon Sep 17 00:00:00 2001
From: Maciej Pawel Szymanski <maciej.szymanski@cern.ch>
Date: Tue, 21 Jul 2020 15:12:49 +0000
Subject: [PATCH] provide env with SSL certificates

to make sure that the following works in handlers:
 - python -c "import requests; requests.get('https://lhcb-couchdb.cern.ch/nightlies-nightly')"
 - python -c "from LbNightlyTools.Utils import Dashboard; d=Dashboard()"
---
 scripts/lbpr-collect | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/lbpr-collect b/scripts/lbpr-collect
index 38c6580d..0763e99c 100755
--- a/scripts/lbpr-collect
+++ b/scripts/lbpr-collect
@@ -42,6 +42,8 @@ source handlers-env/bin/activate
 
 # Hack to prevent ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
 export SSL_CERT_DIR=/etc/pki/tls/certs/ 
+export REQUESTS_CA_BUNDLE=/etc/pki/tls/cert.pem
+export SSL_CERT_FILE=/etc/pki/tls/cert.pem
 
 # Collect the run results...
 echo "Run" $LHCBPR_HANDLERS_PATH/collectRunResults.py "$@"
-- 
GitLab