From d662a68e0e0e4033b9c54b06ce78a763ef2e1a91 Mon Sep 17 00:00:00 2001 From: Ryan Roberts Date: Mon, 3 Mar 2025 15:45:16 +0000 Subject: [PATCH] ci: Check config store docs are up-to-date It's very easy to forget to regenerate the rst documentation for the configs after modifying a yaml. So let's check if it's up-to-date in the CI and fail if not. Simply regenerate the docs and check if there is any difference vs the repo. Suggested-by: Sudeep Holla Signed-off-by: Ryan Roberts --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1052a5b..59097f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,6 +85,15 @@ build-documentation: tags: - amd64 script: + - export PATH=$PWD/shrinkwrap:$PATH + - export SHRINKWRAP_BUILD=$PWD/shrinkwrap_workspace + - export SHRINKWRAP_PACKAGE=$PWD/shrinkwrap_workspace/package + - ./documentation/_scripts/genconfigstore.py + - | + if ! git diff --quiet; then + echo "Config store documentation not up-to-date; run genconfigstore.py and commit changes." + exit 1 + fi - pip3 install requests - | if [ ${CI_COMMIT_BRANCH} == ${CI_DEFAULT_BRANCH} ]; then -- GitLab