From be8089fdd831b464567beb414a2d50ff21174d25 Mon Sep 17 00:00:00 2001 From: Marouan MCHARFI Date: Wed, 7 Dec 2022 18:52:03 +0100 Subject: [PATCH] prplmesh: ci: addapt the generation of documentation Since the odl file are generated at build time we need to wait build finish and start generate documentation. Signed-off-by: Marouan MCHARFI --- .gitlab-ci.yml | 3 +++ CMakeLists.txt | 2 +- tools/nbapi-docgen/parse_api.sh | 2 +- version | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 version diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5daa8661e..e8b0151c4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -148,6 +148,8 @@ nbapi-docgen: paths: - build/html when: always + needs: + - job: build-in-docker # Updates gitlab pages with the NBAPI documentation: # https://prpl-foundation.gitlab.io/prplmesh/prplMesh/ @@ -211,6 +213,7 @@ clang-format: artifacts: paths: - build/install + - build/controller pytest: extends: .build-in-docker diff --git a/CMakeLists.txt b/CMakeLists.txt index 9265804ce..6fd3ccbea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ if(NOT DEFINED TARGET_PLATFORM) set(TARGET_PLATFORM "linux") endif() -set (CONTROLLER_ROOT_DM "Device.WiFi.DataModel") +set (CONTROLLER_ROOT_DM "Device.WiFi.DataElements") string(REPLACE "." "\\." CONTROLLER_ROOT_DM_literal ${CONTROLLER_ROOT_DM}) set(CONTROLLER_ROOT_DM_Header "") diff --git a/tools/nbapi-docgen/parse_api.sh b/tools/nbapi-docgen/parse_api.sh index fe7b4f35d..27930b863 100755 --- a/tools/nbapi-docgen/parse_api.sh +++ b/tools/nbapi-docgen/parse_api.sh @@ -6,7 +6,7 @@ rootdir="${scriptdir%/*/*}" [ -z "$VERSION" ] && VERSION="custom-$(date -Iminutes)" mkdir -p "${rootdir}/build" && pushd "${rootdir}/build" || exit 1 -amxo-cg -G xml "${rootdir}/controller/nbapi/odl/controller.odl.in" +amxo-cg -G xml "${rootdir}/build/controller/nbapi/odl/controller.odl" popd || exit 1 if [ ! -r "${rootdir}/build/controller.odl.xml" ]; then echo -e "\\033[1;31mXML generation failed -- ODL syntax issue?\\033[0m" diff --git a/version b/version new file mode 100755 index 000000000..0838f5413 --- /dev/null +++ b/version @@ -0,0 +1,4 @@ +prplmesh_version=@prplmesh_VERSION@ +prplmesh_revision=@PRPLMESH_REVISION@ +prplmesh_build_date=@BUILD_DATE@ +