Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 7b164fe7 authored by Karine Bauch's avatar Karine Bauch
Browse files

debug

parent 5ce88e8b
No related branches found
No related tags found
No related merge requests found
include: include:
- remote: "https://gitlab.com/swepy/cicd-templates/release-by-changelog/-/raw/0.4.2/templates/release-by-changelog.yml" - remote: "https://gitlab.com/swepy/cicd-templates/release-by-changelog/-/raw/0.4.2/templates/release-by-changelog.yml"
- remote: "https://$PRIVATE_TOKEN_FROGGIT@lab.frogg.it/beebryte/cicd/templates/check_json/-/raw/trunk/templates/check_json.yml" # - remote: "https://$PRIVATE_TOKEN_FROGGIT@lab.frogg.it/beebryte/cicd/templates/check_json/-/raw/trunk/templates/check_json.yml"
check_json: test_variable_expansion:
extends: .check_json stage: test
variables:
PROJECT_PATH: 'tests/valid_files'
"invalid check_json":
extends: check_json
variables:
PROJECT_PATH: 'tests/invalid_files'
script: script:
- > - echo "https://${PRIVATE_TOKEN_FROGGIT}@lab.frogg.it/beebryte/cicd/templates/check_json/-/raw/trunk/templates/check_json.yml"
find $PROJECT_PATH -type f -name '*.json' | while read -r file; do
jq '.' "$file" > /dev/null || EXIT_CODE=$?; #
if [ $EXIT_CODE != 0 ]; then #check_json:
echo "$file" # extends: .check_json
echo "check_json found issues as it should" # variables:
else # PROJECT_PATH: 'tests/valid_files'
echo "$file" #
echo "check_json did not find issues as it should" #"invalid check_json":
exit 1 # extends: check_json
fi # variables:
done # PROJECT_PATH: 'tests/invalid_files'
# script:
# - >
# find $PROJECT_PATH -type f -name '*.json' | while read -r file; do
# jq '.' "$file" > /dev/null || EXIT_CODE=$?;
# if [ $EXIT_CODE != 0 ]; then
# echo "$file"
# echo "check_json found issues as it should"
# else
# echo "$file"
# echo "check_json did not find issues as it should"
# exit 1
# fi
# done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment