Workflow extensions¶
Since 7.0
In 7.0 This new mechanism replaces the old workflow system in 6.4. This new version allows the admin to execute custom code or ansible when other significant events occour not just pre-and post deploy.
Refer to Managing extensions for more details on how to register and publish an extension.
Example extension defition¶
Example extension:
{
"name": "testExtensionType",
"label": "test",
"description": "My App Description",
"kind": "workflow",
"definition": {
"kind": "ExtensionDefinition",
"schemaVersion": "1.1",
"name": "string",
"label": "string",
"extensionType": "string",
"vendor": "string",
"extensionVersion": "string",
"description": "string",
"icon": "string",
"dependencies": {
"controllerVersion": "string"
},
"inputs": [
],
"outputs": [
],
"assets": [
],
"onAssetChange": [
{
"stage": "server Registered",
"tasks": [
{
"label": "testInitial",
"taskType": "ExtensionTaskWebhook",
"options": {
"endpoint":"www.google.com",
"method":"GET",
"requestTemplate":"test"
}
}
]
}
]
}
}
More complex example¶
{
"onCreate": [
{
"stage": "preDeploy",
"tasks": [
{
"label": "string",
"taskType": "ExtensionTaskAnsible",
"options": {
"asset": "string",
"playbook": "string",
"executionTimeout": 1,
"executionTimeoutTick": 1,
"version": "string"
}
}
]
},
{
"stage": "postDeploy",
"tasks": [
{
"label": "string",
"taskType": "ExtensionTaskAnsible",
"options": {
"asset": "string",
"playbook": "string",
"executionTimeout": 1,
"executionTimeoutTick": 1,
"version": "string"
}
}
]
}
],
"onAssetChange": [
{
"stage": "serverRegistered",
"tasks": [
{
"label": "string",
"taskType": "ExtensionTaskAnsible",
"options": {
"asset": "string",
"playbook": "string",
"executionTimeout": 1,
"executionTimeoutTick": 1,
"version": "string"
}
}
]
},
{
"stage": "serverDecommissioned",
"tasks": [
{
"label": "string",
"taskType": "ExtensionTaskAnsible",
"options": {
"asset": "string",
"playbook": "string",
"executionTimeout": 1,
"executionTimeoutTick": 1,
"version": "string"
}
}
]
}
]
}