Adding workflows to every deploy¶
MetalSoft’s Global workflows are executed either in the pre-deploy
or the post-deploy
stages of a deploy graph.
Any number of global workflows can be created and at any time, they will be called in sequence in the order of creation.
Note that as these workflows are active immediately after creation and can be called at any time by a deploy so developing the workflow while it is also configured as a global workflow it is not recommended. Instead we recommend developing a second workflow, experimenting with it and referencing it from the global workflow via a WorkflowReference task.
Creating a global workflow and calling another workflow¶
Navigate to the
Workflows
sectionCLick “Add workflow” button.
Select Usage “global” and fill in the other information.
Make sure the workflow that you want to call from the global workflow is
public
and it has a stage definition of type WorkflowReference which is alsopublic
.Enter the newly created global workflow and go to the Workflow Editor.
Add the WorkflowReference of the infrastructure workflow as a task.
Creating a global workflow and adding tasks to it¶
Tasks can also be added directly to the global workflow although it is not recommended. Note that only Public tasks can be added.
Navigate to the
Workflows
sectionClick “Add workflow” button
Select Usage “global” and fill in the other information.
Enter the newly created global workflow and go to the Workflow Editor.
Add new tasks by selecting from the existing (public) stage definitions. Note that only public tasks (stage definitions) can be added as part of global workflows.
Disabling or enabling the execution of a global workflow¶
If you want to stop executing a global workflow during pre / post deploys or if you want to add it to pre / post deploys
Navigate to Workflows > Stage definitions section
Select the stage definition of type
WorkflowReference
linked to the global workflow and uncheck thepre-deploy
orpost-deploy
checkboxes.
Note: The WorkflowReference of a global workflow will have its title “global-workflow-reference-{workflow_title}” and label “global-workflow-reference-{workflow_label}”.