Preconfigured actions

3 minute read

CloudBees platform administrators can create action aliases of CloudBees actions with defined input values, such as URLs and credentials. These action aliases, known as preconfigured actions, improve security and simplify action set-up for developers.

For example, an administrator creates a preconfigured action to run an Octopus deployment. The administrator pre-populates the action to include the Octopus url and token values, so the developer never needs to manage or input these. The developer can then select this preconfigured action to add to their workflow, and input the remaining required space-name, release, and environment-name values specific for their deployment.

Create preconfigured action
Figure 1. An action preconfigured with some required values.

Access a preconfigured action

Actions lists all preconfigured actions in the platform. Search in and sort the preconfigured actions list.

For a list of CloudBees-authored actions, refer to CloudBees actions.

To access a preconfigured action:

  1. Select an organization, and then select Configurations  Actions.

  2. (Optional) Search for a specific action, by entering all or part of an action name into Search.

  3. (Optional) Select an option in Sort by to sort the action list. Choose either Ascending or Descending alphanumerical sort order.

The preconfigured actions are displayed according to your search or sort criteria.

Create a preconfigured action from a CloudBees action

Configure and save a preconfigured action with your specific inputs, using a CloudBees-authored action as a starting point.

To create a preconfigured action:

  1. Select an organization, and then select Configurations  Actions.

  2. Select Create action.

  3. Search for a CloudBees action, by entering all or part of an action name into Search by name, and then select an action.

  4. Enter a Name.

  5. (Optional) Enter a Description.

  6. Enter Action inputs. Inputs marked with an are required to run a workflow, but not required to create a preconfigured action.

    You can submit a preconfigured action without entering values for all required inputs. However, a user of the preconfigured action must enter values for all remaining inputs marked as required before saving and running the workflow.

    Pre-populate Jenkins action inputs
    Figure 2. Preconfiguring a Jenkins® action, with pre-populated fields highlighted
  7. Select Submit.

Your preconfigured action is created, and listed in Actions.

Add a preconfigured action to a workflow

Once a preconfigured action is created, it can be added to any workflow.

Add a preconfigured action step using the visual tool

To add a preconfigured action to a new or existing workflow using the visual tool:

  1. Select an organization, and then select Components.

  2. Select a Component name.

  3. Select Workflows, and then create or update a workflow.

  4. Select Add step to add a step to the job.

  5. Select Select from catalog.

  6. Select a preconfigured action.

    Add preconfigured action
    Figure 3. Adding the highlighted preconfigured action.
  7. Select Apply selected.

  8. Enter required inputs that are not already pre-populated. Inputs marked with an are required.

  9. (Optional) Enter inputs that are not required.

  10. Select Save.

You have added a preconfigured action to your workflow using the visual tool.

Add a preconfigured action step using the code editor

To add a preconfigured action to a new or existing workflow using the code editor:

  1. Select an organization, and then select Components.

  2. Select a Component name.

  3. Select Workflows, and then create or update a workflow.

  4. Use the uses keyword to enter the name of the preconfigured action.

  5. Use the with keyword to set any required inputs that are not already pre-populated.

    In the following example, a preconfigured action named preconfigured-jenkins-action has pre-populated the required url, username, and token inputs. job-name, the remaining required input, is set in the code editor. A parameter is also entered in the code editor, which is not a required field.

    apiVersion: automation.cloudbees.io/v1alpha1 kind: workflow name: My automation on: push: branches: - '**' jobs: build: steps: - uses: my-jenkins-action with: job-name: jenkins_job_name parameters: '{"ENV_NAME":"DEV"}'
Inputs set using the with keyword override any preconfigured values. However, if the preconfigured value is a property that has been marked with Prevent override, attempting to override that value generates an error in the workflow.

You have added a preconfigured action to your workflow using the code editor.

Update a preconfigured action

Update configuration settings of a preconfigured action. You must have the administrator role to make updates.

To update an action:

  1. Select an organization, and then select Configurations  Actions.

  2. Select Vertical ellipsis next to the action you want to update.

  3. Select Edit action.

  4. Make any desired changes.

  5. Select Save.

The selected preconfigured action is updated accordingly.

Delete a preconfigured action

Delete any preconfigured action, as long as you have the administrator role. A deleted preconfigured action is completely removed from the CloudBees platform, and deletion is irreversible.

To delete a preconfigured action:

  1. Select an organization, and then select Configurations  Actions.

  2. Select Vertical ellipsis next to the action you want to delete.

  3. Select Delete action.

  4. Select Delete.

The selected preconfigured action is deleted and removed from the actions list.