- 22 Apr 2021
- 4 Minutes to read
-
Print
-
DarkLight
-
PDF
Pipeline JSON Model
- Updated on 22 Apr 2021
- 4 Minutes to read
-
Print
-
DarkLight
-
PDF
Pipelines are stored as JSON-formatted files. You can edit pipelines in the web interface using the visual or text mode.
Pipeline
A pipeline consists of a sequence of stages, variables, and several other properties and options. The following are the contents of a pipeline's JSON file.
Property | Description |
---|---|
Color |
a string in the format #RRGGBB used to represent the color used in the UI |
Description |
a string to document the pipelines intended usage |
EnforceStageSequence |
a boolean to indicate whether the stage sequence should be enforced (requiring a Force to override), or if any stage can be deployed to at any time |
PostDeploymentOptions |
an object with the following property/value pairs. Each value is a boolean.
|
Variables |
an object with property/values representing variable names and values
|
Stages |
an array of Stage objects |
Stage
A stage consists of a gate, variables, pre-deployment steps, targets, post-deployment steps, and several properties and options.
This object is used to describe the Stage property of a Pipeline object.
Property | Description |
---|---|
Name |
a string representing the name of the stage |
Description |
a string to document the stage's intended usage |
AutoPromote |
a boolean indicating whether a deployment to the next stage will automatically occur if the target is next stage's gate is met |
TargetExecutionMode |
a string with either Parallel or Sequential |
Gate |
a Gate object |
Variables |
an object with property/values representing variable names and values
|
Targets |
an array of Target objects |
PreDeploymentSteps |
an array of strings containing OtterScript strings that are run prior to target evaluation |
PostDeploymentSteps |
an array of objects or strings, representing steps that are run after target execution Each object has two properties:
Script is the string itself and RunOnFail: false |
Gate
A gate is a mix of manual and automated approval requirements that a build must have before being deployed to a stage, and are used to ensure the quality and acceptability of a build as it passes through the pipeline.
This object is used to describe the Gate property of a Stage object.
Property | Description |
---|---|
UserApprovals |
an array of objects representing people that must approve deployment into the stage; each object has two properties:
|
GroupApprovals |
an array of objects representing people in groups that must approve deployment into the stage; each object has 3 properties:
|
AutomatedChecks |
an AutomatedCheck object |
DeploymentWindows |
an array of objects representing times in which a deployment may occur
|
Target
A target is comprised of a deployment plan, an environment name and a list of servers or roles to be deployed.
This object is expected in the Targets array property on the Stage object.
Property | Description |
---|---|
PlanName |
a string of the plan name that will be executed at the target |
EnvironmentName |
a string of the name of the environment that is targeted |
RoleNames |
an array of strings representing the roles that are targeted |
ServerNames |
an array of strings representing the names of the servers targeted |
Automated Check
An automated check object describes the automated checks that occur in a pipeline stage gate.
This object is expected in the AutomatedChecks property of the Gate object.
Property | Description |
---|---|
Issues |
an object that represents issue statuses required to allow promotion to this stage; each object has two properties:
|
Tests |
a string of the name of the environment that is targeted |
Variables |
an array of strings representing the roles that are targeted |
OtterScript Strings
OtterScript strings are JSON-encoded strings with optional additional header directives that are used by the UI to determine which pre- or post-deployment step types are displayed.
Here are some examples of valid OtterScript strings in JSON:
Send an email...
"##AH:Email\\r\\n\\r\\nSend-Email\\r\\n(\\r\\n To: user@example.com,\\r\\n Subject: Hello,\\r\\n Body: Body text\\r\\n);\\r\\n",
Set stage variable...
"##AH:SetVariable\\r\\n\\r\\nset $TestVariable = TestValue;\\r\\n",
Execute PowerShell...
"##AH:PowerShell\\r\\n\\r\\nPsExec\\r\\n(\\r\\n Text: write-host \\"Hello from PowerShell\\";\\r\\n);\\r\\n",
Execute custom OtterScript...
"Exec D:\\\\Tools\\\\tool.exe;"