diff --git a/.ci-scripts/lint.sh b/.ci-scripts/lint.sh index 7c875b085588e42397dcfd89850f95c2a1098678..ba7666fa5c0990486107bd6985acc0b3077a98c7 100644 --- a/.ci-scripts/lint.sh +++ b/.ci-scripts/lint.sh @@ -1,16 +1,31 @@ #!/bin/bash jq --null-input --arg yaml "$1" '.content=$yaml' \ - | curl -vvv "https://git.ethitter.com/api/v4/ci/lint?include_merged_yaml=true" \ + | curl "https://git.ethitter.com/api/v4/ci/lint?include_merged_yaml=true" \ + --silent \ --header 'Content-Type: application/json' \ --header "PRIVATE-TOKEN: $GITLAB_API_PAT" \ - --data @- -o result.json + --data @- \ + -o result.json +echo "" +echo "" +echo "MERGED YAML:" jq --raw-output '.merged_yaml' < result.json + +echo "" +echo "ERRORS:" jq '.errors' < result.json + +echo "" +echo "WARNINGS:" jq '.warnings' < result.json -if [[ true == $(jq '.valid' < result.json) ]]; then +echo "" +echo "IS VALID:" +jq '.valid' < result.json + +if [ "true" == "$(jq '.valid' < result.json)" ]; then exit 0 else exit 1