From 41d81eae4635fa6aa526bffd9cdce134795c34ef Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 26 Aug 2024 19:16:55 -0400 Subject: [PATCH] [CI] Report an error is URLs are missing from reg. entry --- .../ecosystem/integrations-table.md | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/ecosystem/integrations-table.md b/layouts/shortcodes/ecosystem/integrations-table.md index 9b63ad695d0b..28b4dc6f26e6 100644 --- a/layouts/shortcodes/ecosystem/integrations-table.md +++ b/layouts/shortcodes/ecosystem/integrations-table.md @@ -12,9 +12,32 @@ Name[^1] | OSS | Component | Learn more ------------ | --- | ---------- | ---------- {{- range sort (sort $integrations ".title") ".oss" "desc" }} -{{ $lang := cond (eq .language "collector") (dict "name" "Collector") (index $.Site.Data.instrumentation .language) -}} -{{ $cncfTag := cond (isset . "cncfProjectLevel") (printf "\"CNCF" (humanize .cncfProjectLevel) (humanize .cncfProjectLevel)) "" -}} -[{{ .title }}]({{ .urls.website }}){{ $cncfTag }} | {{- cond (eq .license "Commercial") "No" "Yes" }} | {{ $lang.name }} | [{{ replace .urls.docs "https://" "" }}]({{ .urls.docs }}) +{{ $lang := cond + (eq .language "collector") + (dict "name" "Collector") + (index $.Site.Data.instrumentation .language) +-}} +{{ $cncfTag := cond + (isset . "cncfProjectLevel") + (printf "\"CNCF" + (humanize .cncfProjectLevel) + (humanize .cncfProjectLevel)) + "" -}} + +{{ if not .urls.website -}} + {{ errorf "Website URL is missing for integrations registry entry '%s'" .title -}} +{{ end -}} +{{ if not .urls.docs -}} + {{ errorf "Docs URL is missing for integrations registry entry '%s'" .title -}} +{{ end -}} + +{{/* Each line below is a table column */ -}} + +[{{ .title }}]({{ .urls.website }}) + {{- $cncfTag }} | + {{- cond (eq .license "Commercial") "No" "Yes" }} | + {{- $lang.name -}} + | [{{ replace .urls.docs "https://" "" }}]({{ .urls.docs }}) {{- end }} [^1]: Listed alphabetically