Now validating JSON files in Gitlab pipeline

This commit is contained in:
Dan Ginovker 2022-11-16 12:22:56 +00:00 committed by Ryan
parent 41f1b7f3a7
commit 60cf2472b6

View file

@ -9,6 +9,9 @@ variables:
# This template uses jdk8 for verifying and deploying images # This template uses jdk8 for verifying and deploying images
image: maven:3-openjdk-11 image: maven:3-openjdk-11
before_script:
- apt-get update -qq && apt-get install -qq -y --no-install-recommends jq
# Cache downloaded dependencies and plugins between builds. # Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"' # To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache: cache:
@ -23,3 +26,11 @@ verify:jdk11:
except: except:
variables: variables:
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
test:json:
stage: test
script:
- 'find . -name \*.json -type f -print0 | xargs -0 -n1 -P8 jq empty'
except:
variables:
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH