Skip to content
Snippets Groups Projects
Commit ce6bd825 authored by Malte's avatar Malte
Browse files

generated goplantuml to wiki

this CI job makes it possible to fill the page "HOME" of the .wiki with
the UML generated by goplantuml.
parent 42f5c0c9
No related branches found
No related tags found
9 merge requests!246Develop,!245Develop into Master,!244Master into develop2 into master,!219Draft: Testing,!214Test pipelines,!195DO NOT MERGE 2,!194DO NOT MERGE! just for testing,!138Develop,!134Resolve "Autogenerate UML Diagrams"
Pipeline #68084 failed
goplantuml: goplantuml:
image: golang:1.14-alpine image: golang:1.14-alpine
stage: .post stage: uml
when: manual when: manual
variables: variables:
FILENAME: "ClassDiagram.puml" FILENAME: "home.md"
WIKI_URL: "${CI_SERVER_PROTOCOL}://project_${CI_PROJECT_ID}_bot:${UML_TO_WIKI_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/${CI_PROJECT_PATH}.wiki.git"
script: script:
# install git # install git
- apk update && apk add git - apk update && apk add git
# install goplantuml # install goplantuml
- go get github.com/jfeliu007/goplantuml/cmd/goplantuml - go get github.com/jfeliu007/goplantuml/cmd/goplantuml
# remove old wiki folder
- rm -rf "/tmp/${CI_PROJECT_NAME}.wiki"
# clone and move to wiki folder
- cd /tmp
- git clone "${WIKI_URL}"
- cd "${CI_PROJECT_NAME}.wiki"
- echo '```plantuml' > "$FILENAME"
# run goplantuml # run goplantuml
- goplantuml "${CI_PROJECT_DIR}/nucleus" >> "$FILENAME" - goplantuml "${CI_PROJECT_DIR}" >> "$FILENAME"
- echo '```' >> "$FILENAME"
# git commit
- git config user.name "$GITLAB_USER_NAME"
- git config user.email "$GITLAB_USER_EMAIL"
- git add "$FILENAME"
- git commit -m "Auto-updated UML diagram"
- git push origin "HEAD:master"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment