From 01caf624211197a993dbbd186149293f7053f9d8 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 8 Feb 2022 12:28:37 -0800 Subject: Regenerate generated code as part of the build There are a number of cases where people don't realize that the schemas are owned by Redfish, and that some of the generated files (registries, indexes) are in fact generated, and shouldn't be modified by hand. This commit forces a regeneration of all those files within Jenkins, each time we do a local build, then does a git diff to compare if the upstream schema files and generated files are different than what is checked in, it will print the diff immediately in the Jenkins build. This should hopefully give much faster feedback to users that their change needs to modify the right files. As part of this commit, we also need to take the version string out of clang-format. CI/the system should own the clang-format version. Related commit: https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-build-scripts/+/51041] Tested: Ran script, build passed. Removed the schema fixes from patch series, saw build failed. Did the same with running the openbmc-build-scripts unit test script. Signed-off-by: Ed Tanous Change-Id: I17eb0e106be267e8dbba7053b0b07ec617893c86 --- run-ci | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 run-ci (limited to 'run-ci') diff --git a/run-ci b/run-ci new file mode 100755 index 0000000000..85779d50c7 --- /dev/null +++ b/run-ci @@ -0,0 +1,9 @@ +#!/bin/bash +# generate the generatable files in CI to make sure they haven't changed +set -e + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +"$SCRIPT_DIR/scripts/parse_registries.py" +"$SCRIPT_DIR/scripts/update_schemas.py" +git --no-pager -C "$SCRIPT_DIR" diff --exit-code -- cgit v1.2.3