diff --git a/.travis.yml b/.travis.yml index 4b669d7..de0ca95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,8 @@ dist: bionic language: go go: - master - - 1.13.x - - 1.12.x + #- 1.13.x + #- 1.12.x go_import_path: github.com/rh-messaging/shipshape @@ -28,6 +28,12 @@ before_install: # Get tools - export GO111MODULE=off; go get sigs.k8s.io/kind + #- export GOPATH=`go env GOPATH` + - go get github.com/jfeliu007/goplantuml/parser + - go get github.com/jfeliu007/goplantuml/cmd/goplantuml + - cd $GOPATH/src/github.com/jfeliu007/goplantuml + - go install ./... + - cd - # Create a new Kubernetes cluster using KinD - kind create cluster @@ -37,5 +43,6 @@ script: - export GO111MODULE=on - cd $GOPATH/src/github.com/rh-messaging/shipshape - make + - make uml - make cluster-test diff --git a/Makefile b/Makefile index dde3dfc..1573e62 100644 --- a/Makefile +++ b/Makefile @@ -13,3 +13,9 @@ build: cluster-test: go build ./test/... go test --count=1 -v "./test/framework" + +.PHONY: uml +uml: + goplantuml -recursive pkg/api/client/ > client.puml + goplantuml -recursive pkg/apps/ > apps.puml + goplantuml -recursive pkg/framework/ > framework.puml diff --git a/README.md b/README.md index 5357d75..2030659 100644 --- a/README.md +++ b/README.md @@ -89,3 +89,19 @@ Here is an overview on what is being performed on each file used by the end-to-e - The teardown process of the created `Framework` instance is exected in the `AfterEach` execution test/framework/framework_test.go - Validates that the supported operators have been deployed on the new namespace + +# Generating and viewing project UML + +- To generat UML you need to install goplantuml (outside of the go.mod path): + +```shell script +$ go get github.com/jfeliu007/goplantuml/parser +$ go get github.com/jfeliu007/goplantuml/cmd/goplantuml +$ cd $GOPATH/src/github.com/jfeliu007/goplantuml +$ go install ./... +``` + +- Once installed just doing `make uml` will generate some `*.puml` files in your current folder matching the go packages. +- To visualize the resulting "PlantUML" files, one option is just to install + the "PlantUML Visualizer" plugin in your browser (for firefox: https://addons.mozilla.org/es/firefox/addon/plantuml-visualizer/). +- Then just open the files with your browser or do something like `$ firefox file://${PWD}/framework.puml`