1 $group
2 $
3 var sect = {
4 title: 'Artifact generators'
5 };
6 section( §)
7 p Artifact generators are contained in Wizzi Plugins and are exposed to
8 \b the Wizzi factory implementing the wizzi-plugin.factoryPlugin API.
9 p The wizzi-plugin.factoryPlugin.getArtifactGenerator(artifactKey) method
10 \b returns a wizzi-plugin.artifactGenerator interface for generating
11 \b the requested `artifactName`.
12 ittf-panel
13 title wizzi-plugin.artifactGenerator API
14 ittf
15 {
16 func gen
17 { model
18 | api-ref wizzi-plugin.wizziModel
19 | POJO
20 { ctx
21 api-ref wizzi.artifact.genContext
22 callback
23 p Plugins authors are free to implement this interface with their
24 \b preferred tools.
25 p In this documentation section we describe solutions that the wizzi
26 \b factory has taken for its own artifact generators.
27 h4 File location of artifact generators
28 p Artifact generators must have a standard file location in the plugin package.
29 ittf-panel
30 ittf
31 ...
32 {package-name}
33 package.json
34 ...
35 lib
36 artifacts
37 {wfschema-name}
38 {artifact-name}
39 gen
40 main.js
41 p The file 'main.js' is the module that exposes
42 \b the wizzi-plugin.artifactGenerator interface for the
43 \b artifact of key: {wfschema-name}/{artifact-name}.
44 p This artifact key must be unique in the plugins configuration
45 \b of the wizzi.WizziFactory instance that is executing the generation.
46 h4 Example of 'generator' attribute in a 'wzjob'
47 p The artifact key
48 \b must be the value to be declared in the `generator` attribute of the
49 \b `artifact` element of a Wizzi Job.
50 ittf-panel
51 title Use of an artifact generator in a Wizzi job
52 ittf
53 wzjob {job-name}
54 ...
55 line {line-name}
56 artifact {artifact-generation-description}
57 ...
58 generator {wfschema-name}/{artifact-name}
59 ...