Automation Menu
Workflows

Creating a Workflow

9min
here's a step by step guide to help you set up a workflow creating a workflow using the workflow editor step 1 navigate to the automation menu go to the left side panel and look for the automation section navigate to workspace then select workflows step 2 select the workspace in the top right corner of the screen, find and click on the dropdown list to select your workspace once selected, a list of all existing workflows within the chosen workspace will be displayed in the working area step 3 create a new workflow click on the create a workflow button on the top left side of the working area step 4 enter workflow details a prompt will appear for you to provide details of the workflow enter the name , description , and tags for the workflow set the active toggle to on or off based on whether you want the workflow to be active immediately upon creation click on save step 5 access the workflow editor the workflow editor will then open up here, you will see the available nodes on the left side panel the central part of the screen is the active area where you'll construct your workflow on the top right, you'll find options for history, webhooks, and the code editor step 6 add and configure nodes begin by clicking the plus sign on the workflow editor a list with top level nodes will be displayed each node in kubeark's workflow editor has its own set of customizable arguments and settings, allowing for tailored functionality within your workflow here's an overview of the top level nodes and their specific customization options node type detailed customization options action default actions can be found here about nodes docid gz60tk0o28jqznsbch9w approve allows you to set up a manual intervention point, where a workflow pauses until manual approval is given workflow provides a window for scripting custom logic or actions, where you can write or paste your script code define variables presents options to create and assign values to variables used within the workflow\ for loop configures loop iterations, setting how many times a particular set of actions within the workflow should be repeated function brings up a window where you can define variables, set parameters, and configure other function specific settings branch enables you to define the conditions under which different paths of the workflow will be executed sleep allows you to set a duration for the workflow to pause before proceeding to the next step terminate involves setting the conditions under which a workflow should be prematurely ended while loop provides the ability to set a condition that keeps the workflow in a loop as long as the condition remains true a few examples below step 7 test the workflow once you have added and configured the nodes, test the workflow click the β€œplay” button located at the upper middle side of the working area this action will execute the workflow, allowing you to verify its functionality and make any necessary adjustments the execution history will pop up, displaying the output for the recent run creating a workflow using the code editor for those who are more inclined towards coding or require finer control over their workflows, kubeark offers a specialized feature the code editor this tool is ideal for creating and editing a workflow manifest directly through code it caters to users who are comfortable with scripting and prefer a more hands on approach to defining the intricacies of their workflows the code editor provides an interface where you can write, modify, and fine tune the workflow's underlying code, offering a high level of customization and precision this feature is especially useful for complex workflows where specific programming logic or advanced configurations are needed whether you're looking to draft a new workflow from scratch or make detailed adjustments to an existing one, the code editor in kubeark is a key functionality to leverage a sample manifest can be found below \ name def variables def api token \[add your api token] url \[add your url] owner owner name owner update owner update user id 53 \ name create deployment checks action createdeployment input api token ${{api token}} time out 30 wait for result false deployment name workflow ${{random string(2)}} owner ${{owner}} tags \ test template id 677 cluster id 7 default time 7 additional time 6 grace time 5 namespace wftest environment action terminate extra args date ${{ current date() }} ingress hostname hello ${{ random int(5) }} domain name iptarget 51 124 141 121 uuid ${{ random uuid() }} extra args sensitive \ uuid