summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorIlya Shipitsin <chipitsine@gmail.com>2023-04-26 20:39:39 +0200
committerWilly Tarreau <w@1wt.eu>2023-05-08 14:05:44 +0200
commited79a27a913479122ff55a294f5ef1912dc0e925 (patch)
tree628cedaa6b5ad207aa6f315b5180c8cc105cc2e7 /.github
parent652d1712dd8eef47fd669c1a6e1481725c644b4a (diff)
downloadhaproxy-ed79a27a913479122ff55a294f5ef1912dc0e925.tar.gz
CI: more granular failure on generating build matrix
when some api endpoints used for determine latest OpenSSL, LibreSSL are unavailable, fail only those builds, not entire matrix
Diffstat (limited to '.github')
-rwxr-xr-x.github/matrix.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/.github/matrix.py b/.github/matrix.py
index a2a02e968..7f22c43bb 100755
--- a/.github/matrix.py
+++ b/.github/matrix.py
@@ -33,11 +33,13 @@ def determine_latest_openssl(ssl):
headers = {}
if environ.get("GITHUB_TOKEN") is not None:
headers["Authorization"] = "token {}".format(environ.get("GITHUB_TOKEN"))
-
request = urllib.request.Request(
"https://api.github.com/repos/openssl/openssl/tags", headers=headers
)
- openssl_tags = urllib.request.urlopen(request)
+ try:
+ openssl_tags = urllib.request.urlopen(request)
+ except:
+ return "OPENSSL_VERSION=failed_to_detect"
tags = json.loads(openssl_tags.read().decode("utf-8"))
latest_tag = ""
for tag in tags:
@@ -50,9 +52,12 @@ def determine_latest_openssl(ssl):
@functools.lru_cache(5)
def determine_latest_libressl(ssl):
- libressl_download_list = urllib.request.urlopen(
- "https://cdn.openbsd.org/pub/OpenBSD/LibreSSL/"
- )
+ try:
+ libressl_download_list = urllib.request.urlopen(
+ "https://cdn.openbsd.org/pub/OpenBSD/LibreSSL/"
+ )
+ except:
+ return "LIBRESSL_VERSION=failed_to_detect"
for line in libressl_download_list.readlines():
decoded_line = line.decode("utf-8")
if "libressl-" in decoded_line and ".tar.gz.asc" in decoded_line: