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

Merge branch 'fix/linting' into 'main'

Fix linting

See merge request !34
parents 857c8d96 d7817f78
No related branches found
No related tags found
1 merge request!34Fix linting
#!/bin/bash #!/bin/bash
jq --null-input --arg yaml "$1" '.content=$yaml' \ jq --null-input --arg yaml "$1" '.content=$yaml' \
| curl "https://git.ethitter.com/api/v4/ci/lint?include_merged_yaml=true" \ | curl "https://git.ethitter.com/api/v4/projects/${CI_PROJECT_ID}/ci/lint?include_merged_yaml=true" \
--silent \ --silent \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header "PRIVATE-TOKEN: $GITLAB_API_PAT" \ --header "PRIVATE-TOKEN: $GITLAB_API_PAT" \
--data @- \ --data @- \
-o result.json -o result.json
# TODO: save the `result.json` as an artifact.
echo "**********************************************************" echo "**********************************************************"
echo "MERGED YAML:" echo "MERGED YAML:"
jq --raw-output '.merged_yaml' < result.json jq --raw-output '.merged_yaml' < result.json
......
...@@ -10,9 +10,15 @@ lint:plugins:default: ...@@ -10,9 +10,15 @@ lint:plugins:default:
image: containers.ethitter.com:443/docker/images/debian:bullseye image: containers.ethitter.com:443/docker/images/debian:bullseye
script: script:
- sh ./.ci-scripts/lint.sh "$(<./plugins/default.yml)" - sh ./.ci-scripts/lint.sh "$(<./plugins/default.yml)"
artifacts:
paths:
- result.json
lint:plugins:default-redis: lint:plugins:default-redis:
stage: test stage: test
image: containers.ethitter.com:443/docker/images/debian:bullseye image: containers.ethitter.com:443/docker/images/debian:bullseye
script: script:
- sh ./.ci-scripts/lint.sh "$(<./plugins/default-redis.yml)" - sh ./.ci-scripts/lint.sh "$(<./plugins/default-redis.yml)"
artifacts:
paths:
- result.json
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment