Skip to content
Snippets Groups Projects

Resolve "Autogenerate UML Diagrams"

Merged Ghost User requested to merge 101-autogenerate-uml-diagrams into develop
1 file
+ 20
3
Compare changes
  • Side-by-side
  • Inline
  • ce6bd825
    generated goplantuml to wiki · ce6bd825
    Malte authored
    this CI job makes it possible to fill the page "HOME" of the .wiki with
    the UML generated by goplantuml.
goplantuml:
image: golang:1.14-alpine
stage: .post
stage: uml
when: manual
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:
# install git
- apk update && apk add git
# install 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
- 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"
Loading