Loading generateChangemarks/.gitlab-ci.yml +3 −2 Original line number Diff line number Diff line Loading @@ -139,13 +139,14 @@ Publish spec: - "baseline/*_${CI_COMMIT_TAG}.docx" - "baseline/*_${CI_COMMIT_TAG}.pdf" - "baseline/*_${CI_COMMIT_TAG}.epub" - combined.md pages: stage: web image: python:3.9.18-slim-bullseye tags: - docker #needs: ["Publish spec"] Uncomment when finishing testing needs: ["Publish spec"] variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" PAGES_BRANCH: gl-pages Loading generateChangemarks/changemarks.py +2 −2 Original line number Diff line number Diff line Loading @@ -599,8 +599,8 @@ def main(args=None): mr = MR(pargs.projectID, pargs.mergeID, pargs.rootURL) for patched_file in mr.patch_set: if patched_file.source_file.startswith("a/TS") or patched_file.source_file.startswith("a/TR") or patched_file.source_file.startswith("a/GR") or patched_file.source_file.startswith("a/GS") or patched_file.source_file.startswith("a/WI"): filename = patched_file.source_file.split("/")[1] if not patched_file.source_file.startswith("a/README"): filename = "/".join(patched_file.source_file.split("/")[1:]) process(filename, pargs.outDirectory, mr) else: logging.debug(f"Cannot process file named {patched_file.source_file}") Loading publish_spec.sh +7 −0 Original line number Diff line number Diff line Loading @@ -13,9 +13,13 @@ DOCKER_IMAGE=pandoc:master TOOLS_DOCKER_IMAGE=generatechangemarks:master MARKDOWN_TOOLS_DOCKER_IMAGE=forge.etsi.org:5050/cti/tools/markdowntools:master echo "\n------ Checking for docker image --------" docker pull "$DOCKER_IMAGE" #docker pull "$GENERATE_BASELINE_DOCKER_IMAGE" #docker pull "$MARKDOWN_TOOLS_DOCKER_IMAGE" #docker pull "$TOOLS_DOCKER_IMAGE" echo "------ Removing previous outputs --------" rm **/*.docx Loading Loading @@ -51,6 +55,9 @@ done for i in *.md ; do if [ $i != 'README.md' ]; then if [[ $i =~ (TS|TR).*\.md ]] ; then echo "\n------ Processing MD file to combine all clauses (::include) -------" docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) -w "/tmp" "$MARKDOWN_TOOLS_DOCKER_IMAGE" processMDSpec "$i" > combined.md cat combined.md > $i echo "\n------ Adding TOC to spec --------" docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) "$TOOLS_DOCKER_IMAGE" generateTOC --add-content "/tmp/$i" fi Loading spec_on_pages.sh +2 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,8 @@ git checkout $7 ####### GENERATE NAV SPEC ####### echo "------ Generate input for mkdocs --------" python3 $1 -it -ihp --title ${9^^} "./$8.md" #python3 $1 -it -ihp --title ${9^^} "./$8.md" python3 $1 -it -ihp --title ${9^^} "./combined.md" ls ${9^^} echo "------ Move to docs folder --------" mv ${9^^}/* docs/ Loading Loading
generateChangemarks/.gitlab-ci.yml +3 −2 Original line number Diff line number Diff line Loading @@ -139,13 +139,14 @@ Publish spec: - "baseline/*_${CI_COMMIT_TAG}.docx" - "baseline/*_${CI_COMMIT_TAG}.pdf" - "baseline/*_${CI_COMMIT_TAG}.epub" - combined.md pages: stage: web image: python:3.9.18-slim-bullseye tags: - docker #needs: ["Publish spec"] Uncomment when finishing testing needs: ["Publish spec"] variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" PAGES_BRANCH: gl-pages Loading
generateChangemarks/changemarks.py +2 −2 Original line number Diff line number Diff line Loading @@ -599,8 +599,8 @@ def main(args=None): mr = MR(pargs.projectID, pargs.mergeID, pargs.rootURL) for patched_file in mr.patch_set: if patched_file.source_file.startswith("a/TS") or patched_file.source_file.startswith("a/TR") or patched_file.source_file.startswith("a/GR") or patched_file.source_file.startswith("a/GS") or patched_file.source_file.startswith("a/WI"): filename = patched_file.source_file.split("/")[1] if not patched_file.source_file.startswith("a/README"): filename = "/".join(patched_file.source_file.split("/")[1:]) process(filename, pargs.outDirectory, mr) else: logging.debug(f"Cannot process file named {patched_file.source_file}") Loading
publish_spec.sh +7 −0 Original line number Diff line number Diff line Loading @@ -13,9 +13,13 @@ DOCKER_IMAGE=pandoc:master TOOLS_DOCKER_IMAGE=generatechangemarks:master MARKDOWN_TOOLS_DOCKER_IMAGE=forge.etsi.org:5050/cti/tools/markdowntools:master echo "\n------ Checking for docker image --------" docker pull "$DOCKER_IMAGE" #docker pull "$GENERATE_BASELINE_DOCKER_IMAGE" #docker pull "$MARKDOWN_TOOLS_DOCKER_IMAGE" #docker pull "$TOOLS_DOCKER_IMAGE" echo "------ Removing previous outputs --------" rm **/*.docx Loading Loading @@ -51,6 +55,9 @@ done for i in *.md ; do if [ $i != 'README.md' ]; then if [[ $i =~ (TS|TR).*\.md ]] ; then echo "\n------ Processing MD file to combine all clauses (::include) -------" docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) -w "/tmp" "$MARKDOWN_TOOLS_DOCKER_IMAGE" processMDSpec "$i" > combined.md cat combined.md > $i echo "\n------ Adding TOC to spec --------" docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) "$TOOLS_DOCKER_IMAGE" generateTOC --add-content "/tmp/$i" fi Loading
spec_on_pages.sh +2 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,8 @@ git checkout $7 ####### GENERATE NAV SPEC ####### echo "------ Generate input for mkdocs --------" python3 $1 -it -ihp --title ${9^^} "./$8.md" #python3 $1 -it -ihp --title ${9^^} "./$8.md" python3 $1 -it -ihp --title ${9^^} "./combined.md" ls ${9^^} echo "------ Move to docs folder --------" mv ${9^^}/* docs/ Loading