From 981208d8437ec4e7c9306ce23cae35f20baa3d6e Mon Sep 17 00:00:00 2001 From: linsui Date: Wed, 24 May 2023 16:35:15 +0800 Subject: [PATCH] CI: check all metadata when the schema is changed --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a302102d66..3b53227186 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -188,6 +188,9 @@ schema validation: - pip install check-jsonschema script: - check-jsonschema --check-metaschema schemas/metadata.json || exit 1 + - *get_target_source_refs + - git diff --exit-code --name-only "${TARGET_REF}...${SOURCE_REF}" schemas/metadata.json + || { check-jsonschema --schemafile schemas/metadata.json metadata/*.yml || exit 1; exit; } - set -xe - *get_changed_apps - if [ -z "$CHANGED" ]; then exit; fi