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. Preconfiguring an action, with pre-populated values highlighted

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-created actions, refer to CloudBees actions.

To access a preconfigured action:

  1. Select the next to Configurations on the left pane, and then select 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-created action as a starting point.

To create a preconfigured action:

  1. Select the next to Configurations on the left pane, and then select 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 Components, and then select a specific Component name.

  2. Select the next to Components on the left pane, and then select Workflows.

  3. Create a workflow or update an existing workflow.

  4. Select or create a JOB.

  5. Select ADD STEP to add a step to the job.

    Add step to workflow
    Figure 3. A selected job and ADD STEP highlighted.
  6. Select SELECT FROM CATALOG.

  7. Select a preconfigured action.

    Add preconfigured action
    Figure 4. Adding the highlighted preconfigured action.
  8. Select APPLY SELECTED.

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

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

  11. 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 Components, and then select a specific Component name.

  2. Select the next to Components on the left pane, and then select Workflows.

  3. Create a workflow or update an existing 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 my-jenkins-action has pre-populated the required url, username, and token inputs. job-name, the remaining required input, is set in the code editor.

    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 the next to Configurations on the left pane, and then select Actions.

  2. Select the 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 the next to Configurations on the left pane, and then select Actions.

  2. Select the 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.