From cb9b7534e56d6fa9f06511ee18738832f6664a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enol=20Fern=C3=A1ndez?= Date: Wed, 11 Dec 2024 12:22:20 +0000 Subject: [PATCH] Remove vo.e-rihs.eu from list (#384) * Remove vo.e-rihs.eu from list * Better GitHub integration * Fix linting issue * Better output --- validate.sh | 25 +++++++++++-------------- vo-mappings.yaml | 1 - 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/validate.sh b/validate.sh index 46f40543..602a41fe 100755 --- a/validate.sh +++ b/validate.sh @@ -11,7 +11,7 @@ curl --silent "http://cclavoisier01.in2p3.fr:8080/lavoisier/VoList?accept=json" # Get fedcloudclient sites FEDCLOUD_CLI_SITES=$(mktemp) -curl "https://raw.githubusercontent.com/tdviet/fedcloudclient/master/config/sites.yaml" \ +curl --silent "https://raw.githubusercontent.com/tdviet/fedcloudclient/master/config/sites.yaml" \ >"$FEDCLOUD_CLI_SITES" # Temp file for nova endpoint @@ -20,21 +20,19 @@ NOVA_ENDPOINT=$(mktemp) for f in sites/*.yaml; do goc_site=$(grep "^gocdb:" "$f" | cut -f2 -d":" | tr -d "[:space:]") endpoint=$(grep "^endpoint:" "$f" | cut -f2- -d":" | tr -d "[:space:]") - printf "Searching for endpoint %s in %s site (%s)\n" \ - "$endpoint" "$goc_site" "$f" + echo "::debug::Searching for endpoint $endpoint in $goc_site site ($f)" curl --silent "$goc_method&sitename=$goc_site&service_type=org.openstack.nova" \ >"$NOVA_ENDPOINT" if ! grep -q "$goc_site" "$NOVA_ENDPOINT"; then - printf "\033[0;31m[ERROR] Site %s not found in GOC\033[0m\n" "$goc_site" + echo "::error file=$f title=Missing site::Site $goc_site not found in GOC" exit_value=1 continue fi if ! grep -q "$endpoint" "$NOVA_ENDPOINT"; then - printf "\033[0;31m[ERROR] URL %s for %s not found in GOC\033[0m\n" \ - "$endpoint" "$goc_site" + echo "::error file=$f title=URL not found::URL $endpoint for $goc_site not found in GOC" exit_value=1 else - printf "\033[0;32m[OK]\033[0m\n" + echo "::notice file=$f title=OK::Site $goc_site is ok" fi # check if all VOs configured do exist # Try to use FQAN @@ -42,25 +40,24 @@ for f in sites/*.yaml; do # - just the name of the VO # - //some more extra/ # - /VO=/some more stuff/ + # Won't cause error in validation! for vo in $(yq -r ".vos[].name" <"$f" | cut -f2 -d"/" | sed "s/^VO=//"); do if ! grep -q "^$vo\$" "$VO_LIST"; then - printf "\033[0;31m[ERROR] VO %s not found in ops portal\033[0m\n" \ - "$vo" - exit_value=1 + echo "::warning file=$f title=VO not in ops portal::VO $vo not found in ops portal" fi done # check if site is also on: # https://github.com/tdviet/fedcloudclient/blob/master/config/sites.yaml if ! grep -q "$f" "$FEDCLOUD_CLI_SITES"; then - printf "\033[0;31m[ERROR] Site %s not found in fedcloudclient\033[0m\n" "$goc_site" + echo "::error file=$f title=Site not in fedcloudclient::Site $goc_site not found in fedcloudclient" exit_value=1 fi done for site in $(yq -r '.[]' <"$FEDCLOUD_CLI_SITES"); do if ! test -s "sites/$(basename "$site")"; then - printf "\033[0;31m[ERROR] Site %s not found in fedcloud-catchall-operations\033[0m\n" "$(basename "$site")" + echo "::error::Site $(basename "$site") not found in fedcloud-catchall-operations" exit_value=1 fi done @@ -68,8 +65,8 @@ done # check that the VO mappings are up to date according to ops portal for vo in $(yq -r '.vos | keys[]'