run-build-script-ci: run formatting under docker
The code formatting script makes assumptions about formatting
tools being available which are often not installed on the
Jenkins hosts (or may be the wrong version). Switch to run the
tool under Docker, so we get a consistent and correct version of
these tools installed, by utilizing the 'run-unit-test-docker'
script. This script runs the code formatters, and fails the
execution if they fail, but safely exits when no unit tests or
build system is found (like this repository).
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib24b7258e4920ca3f23e029941f450872fc590f6
diff --git a/jenkins/run-build-script-ci b/jenkins/run-build-script-ci
index 8128c05..ba2f2a9 100755
--- a/jenkins/run-build-script-ci
+++ b/jenkins/run-build-script-ci
@@ -11,8 +11,9 @@
cd "${WORKSPACE}/openbmc-build-scripts"
-# Check code formatting.
-./scripts/format-code.sh .
+# Check code formatting (by running the UT script against this repo).
+UNIT_TEST_PKG=openbmc-build-scripts \
+ "${WORKSPACE}/openbmc-build-scripts/run-unit-test-docker.sh"
# Now run some of our most used CI scripts
./scripts/build-unit-test-docker