Verify that schema files are correctly published (#2868)

This downloads the schema files from https://opentelemetry.io/schemas/ and verifies their content.

Next time we make a release this will force us to make sure
https://github.com/open-telemetry/opentelemetry.io repo is updated
before we make the release.

This helps prevent issues like https://github.com/open-telemetry/opentelemetry.io/issues/1846

Also add release procedure to the docs.
This commit is contained in:
Tigran Najaryan 2022-10-17 17:06:25 -04:00 committed by GitHub
parent 7c53a4e646
commit 6ea1e8d355
1 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,13 @@ grep -o -e '## v[1-9].*\s' $root_dir/CHANGELOG.md | grep -o '[1-9].*' | while re
echo "FAILED: $file does not exist. The schema file must exist because the version is declared in CHANGELOG.md."
exit 3
fi
curl --no-progress-meter https://opentelemetry.io/schemas/$ver > verify$ver
diff verify$ver $file && echo "Published schema at https://opentelemetry.io/schemas/$ver is correct" \
|| (echo "Published schema at https://opentelemetry.io/schemas/$ver is incorrect!" && exit 3)
rm verify$ver
done
# Now check the content of all schema files in the ../shemas directory.