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

  1. Navigate to the Workflows section

  2. CLick “Add workflow” button.

  3. Select Usage “global” and fill in the other information.

  1. 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 also public.

  2. Enter the newly created global workflow and go to the Workflow Editor.

  3. 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.

  1. Navigate to the Workflows section

  2. Click “Add workflow” button

  3. Select Usage “global” and fill in the other information.

  4. Enter the newly created global workflow and go to the Workflow Editor.

  5. 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

  1. Navigate to Workflows > Stage definitions section

  2. Select the stage definition of type WorkflowReference linked to the global workflow and uncheck the pre-deploy or post-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}”.