From 60cf2472b6b917c0f975d8768df3209833ed7ad4 Mon Sep 17 00:00:00 2001 From: Dan Ginovker Date: Wed, 16 Nov 2022 12:22:56 +0000 Subject: [PATCH] Now validating JSON files in Gitlab pipeline --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 91d0ce89c..306a67b70 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,9 @@ variables: # This template uses jdk8 for verifying and deploying images 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. # To keep cache across branches add 'key: "$CI_JOB_NAME"' cache: @@ -23,3 +26,11 @@ verify:jdk11: except: variables: - $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