Skip to main content
System StatusContact Support
VersionOne Community

Continuum Flow Tutorial - Running a Task from a Pipeline

Overview

Learn how to run a task from a pipeline.

In the Using Conditionals tutorial, we used the Conditional plugin function to make a decision based on data that came back from Jenkins. This tutorial will explain how to interface with Continuum Automate Tasks.

Automate Tasks

Automate Tasks can be used to perform general automation from a Flow Pipeline. After the Task is started the Pipeline will pause until the task completes in some way.

The Automate plugin is maintained by Continuum and is used to launch Automate Tasks. Automate Tasks can be scripted to do just about anything. See the Automate section of this docs site for more information on Automate Tasks.

Creating a Sample Task

The first thing to do is visit the Automate First Task tutorial page. Follow the directions creating a first task and then return here to continue with this tutorial.

Using the Automate plugin

In the Pipeline Editor, edit a stage and from the left side, drag and drop the "Automate Run Task" function to the right. At the very minimum, the task name needs to do in the "Task" box. Enter the task name created in the hello world tutorial above.

This will not pass parameters, we'll explore that next. For now, make another commit and return to the Pipeline Instance page. If you click on the stage, then the task you will see the log output from the task run.

Passing Parameters and Other Data

Now let's pass parameters into the task.

[
    {
        "name": "param1",
        "values": [
            "hello"
        ]
    },
    {
        "name": "param2",
        "values": [
            "world"
        ]
    }
]

The parameters properties will be passed to the task with the name being the parameter name and the values being the parameter values. Notice that the parameters declaration is a list or json array as well as the values declaration. For the parameters declaration obviously a task can support multiple parameters. For the values, each parameter can support multiple values which can be spun through and processed if need be. For instance, a list of ip addresses or a list of tests to perform.

See here for more information on the Automate Run Task function

  • Was this article helpful?