Skip to content
Snippets Groups Projects

Test linting for configurations

Merged Erick Hitter requested to merge add/ci-lint into main
3 files
+ 27
7
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 17
0
#!/bin/bash
jq --null-input --arg yaml "$1" '.content=$yaml' \
| curl -vvv "https://git.ethitter.com/api/v4/ci/lint?include_merged_yaml=true" \
--header 'Content-Type: application/json' \
--header "PRIVATE-TOKEN: $GITLAB_API_PAT" \
--data @- -o result.json
jq --raw-output '.merged_yaml' < result.json
jq '.errors' < result.json
jq '.warnings' < result.json
if [[ true == $(jq '.valid' < result.json) ]]; then
exit 0
else
exit 1
fi
Loading