Recipe Configuration
piscosour.json is the file which defines the general configuration of the recipe. It is placed at the root directory of the recipe.
The configuration recipe could be overwritten with others available methods to fill parameters values. See parameters configuration.
This is the general configuration file (piscosour.json) of piscosour:
{
"cmd" : "pisco",
"params" : {
"plugins" : ["inquirer"]
},
"junitDir": "test-reports",
"junitPiscoFile": "pisco-junit.xml",
"stages": [
"core-install",
"core-check",
"check",
"config",
"run",
"prove",
"notify",
"emit"
],
"flowTypes": [
"normal",
"utils",
"internal"
]
}
Then the different methods to configure (recipes, flows, steps, ...) will just add or remove configuration over the existing configuration.
Example of a recipe:
{
"cmd": "cells"
}
Main fields
cmd field
Command name, this command will be executed in a console when the recipe is globally installed.
params field
Global parameters, applies to all flows and steps. See parameter for more information.
junitDir and junitPiscoFile fields
junitDir is the Folder where will save the junit.xml file.
junitPiscoFile is a customized name of the junit.xml file.
These configurations are available when pisco write a junit report.
$ pisco --junitReport
$ pisco -u
stages field
Default stages. See stages for more information.
If it is added a new stage, and will be just executed if the step has its implementation.
{
"stages": [ "final" ]
}
After notify stage, customized final stage will be executed.
final : function() {
this.logger.info("#magenta","notify","Recollect all execution information and notify");
}
flowTypes field
See flows for more information.
implementations field
Piscosour recipes has lazy install strategy for installation, this means that See implementations for more information.
Piscosour parameter syntax
Configuration has different options according to the scopes:
Global configuration
For all flows, steps and contexts
{
"params": {
"param1": "value1"
}
}
Flow configuration
Just for a flow and all its steps and contexts.
{
"flows" : {
"flowName" : {
"params" : {
"param1": "value1"
}
}
}
}
Step configuration
Just for a step and all its contexts.
{
"steps" : {
"stepName" : {
"params" : {
"param1": "value1"
}
}
}
}
Step & Context configuration
Just for a step and a context.
{
"steps" : {
"stepName" : {
"contextName" : {
"params" : {
"param1": "value1"
}
}
}
}
}
In a step all parameters are accessible with this.params.param1.
Priority:
- 1
.piscosour/piscosour.jsonfile in the current working directory where recipe is executed.- 1.1 Step & Context configuration
- 1.2 Step configuration
- 1.3 Flow configuration
- 1.4 Global configuration
- 2
piscosour.jsonfile of the recipe.- 1.1 Step & Context configuration
- 1.2 Step configuration
- 1.3 Flow configuration
- 1.4 Global configuration
This is the priority order (from high to low), if a parameter is provided twice or more, with different values, then it will stay the value that is above in the list.