An Action is a single step in the pipeline, based on one of the selected plugin’s methods. Each Action has a collection of configurable parameters that determine precisely what that Action does.
Each Action has several parameters that you can configure. Selecting an Action in the Design page will open its configuration panel on the right side of the display. You can find the parameters there.
A red asterisk indicates a mandatory parameter. ID is the name of the Action as exposed in code. Display Name is what you see in the Design window and Actions log in the execution results. Optional parameters may be left empty.
There are many ways you can configure a parameter:
- leave it blank (if optional)
- enter plain text
- make a selection from the drop-down menu
Vault Parameter Fields
For security reasons, some plugins require using our Vault to store sensitive data. For example, SSH keys or passwords. The fields that require vaulted items have a drop-down menu that allows you to select or create a new vault item.
You can also create new vault items by going to Settings > Vault from the main menu.
See the Vault page for more details.
Autocomplete Parameter Fields
Some plugins have autocomplete parameter fields that dynamically populate by connecting/authenticating to the external service. For example, our Github plugin dynamically gets the list of Owners to assign when creating a new repository.
Code Parameter Fields
Each code field has full access to the same context as the main Code Page. For example, a simple variable name may be sufficient:
On the code page, the variable needs at minimum a value assigned of the correct type – for this example, a constant string.
const awsRegion = "ap-southeast-1"
Coded Parameter Example: Get the instanceID from an earlier Action in the Pipeline.
Let’s suppose an Action is meant to attach an elastic IP address to an AWS EC2 instance just created by an earlier Action with ID
createInstance. The result set that is viewable in the Execution Results page in the Final Results window includes the Instance ID of the created instance. However, there’s no way to know this ID before the Action runs.
In order to assign the elastic IP to the correct instance, we must access the results from the previous Action using code, as illustrated below. In this example,
createInstance is the name of that previous Action, and everything after
.result. is determined by the JSON schema of the output of that Action.