Skip to content
Snippets Groups Projects
Commit 715db0af authored by Erick Hitter's avatar Erick Hitter
Browse files

Formatting

parent 5517facd
No related branches found
No related tags found
1 merge request!23Test linting for configurations
#!/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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment