-
Notifications
You must be signed in to change notification settings - Fork 3
Basic usage
To generate graphs, you will need to specify three main things
To specify the files that graphs will be generated for, and that will be considered the "roots" of the graph, use --files
parameter. All the root files will be marked red on the resulting graph.
To actually generate a graph, you need to specify which graph you want. Also, you need to specify the yaml root, which is discussed below.
For include graph, use --include-graph
jabba --files maxscale_jobs/build.yaml --include-graph --yaml-root maxscale_jobs
For call graph, use --call-graph
jabba --files maxscale_jobs/build.yaml --call-graph --yaml-root maxscale_jobs
Additional information on specific graphs, see include graph and call graph
You need to pass --yaml-root
parameter, setting directory passed as yaml root. Yaml root is a directory that is considered a "secondary" root of a project. All jobs that are called by a name should be placed in this directory. For example, consider the following project structure
maxscale-jekins-jobs/
maxscale_jobs/
include/
build.yaml
cleanup.yaml
Yaml root should be set to maxscale_jobs
, as this is the directory that contains all the job configs.
By default, generated graphs will be called {file_name}_include.svg
for include graph, and {file_name}_call.svg
for call graph, where {file_name}
is a name of the first file passed to --files
.
To set specific name for generated, use --name
. Note that this will replace {file_name}
, as _include
or _call
suffix will still be presented.
This will generate test_call.svg
jabba --files maxscale_jobs/build.yaml --call-graph --yaml-root maxscale_jobs --name test
Both call and include graphs can be generated in two ways - horizontal and vertical. The default is horizontal.
To change this behavior, use --rank-dir
parameter. left-right
will draw the graph horizontally, while up-down
will draw the graph vertically.
jabba --files maxscale_jobs/build.yaml --call-graph --yaml-root maxscale_jobs --rank-dir left-right
jabba --files maxscale_jobs/build.yaml --call-graph --yaml-root maxscale_jobs --rank-dir up-down
If you don't want to specify some common options like yaml root every time by hand, you can move them into config file. The default one is .jjv_config
, which should be places in the root of the project.
Each option should be written in camel case. Note that setting parameters from cli will completely override the parameters in config.
For example, for setting yaml root and call parameters, use the following config
yaml_root: maxscale_jobs
call_parameters:
- same-node
- node-parameters
You can specify which config to use by using --config
option
jabba --config cool_config.yaml
Note that you can use !include
and !include-raw
the same way you use it in you job configs.
For generating legend for your graphs, use --legend
option
jabba --files maxscale_jobs/build.yaml --call-graph --yaml-root maxscale_jobs --legend