How to set preconfigured actions in the CloudBees platform
Tags: cicd, secretsmanagement, actions, tutorial
Published: 2024-02-26 16:42:09

Previously, we described concepts associated with our [Composer UI](https://www.cloudbees.com/blog/5-ways-developers-can-use-cloudbees-composer-ui-for-workflow-automation) for creating workflows within the [CloudBees platform](https://www.cloudbees.com/products/saas-platform). This blog dives deeper into one of those elements: preconfigured actions.  

This blog is written for platform engineering /administrative teams as the primary audience, with concepts that will also appeal to application developers. Our goal is to provide a clear understanding of what we mean by preconfigured actions, the tangible benefits of this approach, and how to create your own preconfigured action. 

## Setting the stage: Terminology 

Let’s first align on some core terminology used within the platform to help understand where preconfigured actions fit:

**Workflow**
A CloudBees workflow is a collection of jobs developers use to create a “component,” or a piece of software to deliver to customers.

A user can create a workflow in two ways:

- 
Edit the UI using the actions available within the CloudBees software delivery platform and do so under each step.

- 
Edit the code itself.

**Jobs**
Jobs are comprised of steps, which are detailed sets of activities. You can have one or multiple jobs; under each, there can be a single or multiple steps. Each step performs an action that could integrate with external tools.

**CloudBees actions**

CloudBees actions are a custom application for the CloudBees platform that performs complex but frequently repeated tasks. They serve as the starting point for common tasks. Visit our CloudBees actions catalog for a complete listing.

## What are preconfigured actions and their advantages?
[Preconfigured actions ](https://docs.cloudbees.com/docs/cloudbees-saas-platform/latest/configure/preconfigured-actions?_gl=1*jd1ogp*_ga*MTQwMDc3MjgxNS4xNjk4NzU2NTk2*_ga_37TX6SE1FC*MTcwODQzNjc1Ni44Ny4xLjE3MDg0MzY5OTUuMC4wLjA.)are actions with already defined values, such as access tokens, URLs, and settings. This means they come ready with the necessary configurations for use.

Any action can be preconfigured to protect sensitive information, simplify ease of use, and allow for straightforward integration into workflows.


![Preconfigured actions catalog](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18lv4fb7rm7k4ye0aj5h.png)

Preconfigured actions offer several advantages, including:

- 
Simpler and faster action setup for developers

- 
Improved security, as sensitive information remains hidden. 

For example, developers want to use a Snyk SAST Scan as part of their workflow. They can use an action for their tool ([snyk-sast-scan-code](https://github.com/cloudbees-io/snyk-sast-scan-code)) that has been preconfigured with the Snyk organization name, client secret, and language inputs already defined.

By creating preconfigured actions with necessary credentials and settings, developers can seamlessly utilize these actions without directly handling sensitive information like secrets or tokens. This setup ensures that only the administrator needs to manage these details, significantly enhancing security by limiting access to sensitive data within the software delivery process.

**How to create a preconfigured action on the CloudBees platform**

<img width="150%" style="width:150%" src="https://media.giphy.com/media/8H5hAAbsQSC0FtqfSc/giphy.gif">


Here are the detailed steps an administrator needs to follow to configure and save a preconfigured action with specific inputs using a [CloudBees-created action](https://github.com/cloudbees-io) as a starting point:

- 
Select the drop-down arrow next to Configurations on the left pane, then select Actions.

- 
Select CREATE ACTION.

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

- 
Enter a Name.

- 
(Optional) Enter a Description.

- 
Enter Action inputs for Jenkins. Inputs marked with an asterisk are required to run a workflow but are 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.

Select SUBMIT.

**Success!** You have created a preconfigured action listed in Actions.

## Adding Preconfigured Actions to a Workflow
Once your preconfigured action has been created, the next step is to add it as a workflow; this can be done through either the Composer UI or the code editor. The following gif shows how to add this through the graphical composer.  In this example:

- 
User would zoom in on the graphical composer and click **+ Add a Step**

- 
Provide a name for the step.

- 
Click **SELECT FROM CATALOG**

- 
Select the desired Preconfigured Action and then click APPLY SELECTED. From here, the form will be prepopulated with your information.  

- 
The developer will complete the remaining blanks as needed.

- 
Select a Kind option if you want data populated into the Analytics reports. Click **Save**.

Success! You will now see your preconfigured action added as a step in the graphical composer UI and the code editor.

<img width="150%" style="width:150%" src="https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExbjJyMzZqdHNjMDNrcTJubDc1M2YwZGZyM3ZobWZ4YXZmOWlyMXdvOCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/A4bsxhtVpjUIjWOB1m/giphy.gif">


## Getting started

Preconfigured actions are another way the CloudBees platform enhances security, speed, and efficiency for developers. [Start using CloudBees for free](http://cloudbees.io/?_gl=1*euamsc*_ga*MTQwMDc3MjgxNS4xNjk4NzU2NTk2*_ga_37TX6SE1FC*MTcwODQzNjc1Ni44Ny4xLjE3MDg0MzczNTEuMC4wLjA.).

{% embed https://www.youtube.com/watch?v=o_bTRe8vhzg %}

Use the following resources to learn how preconfigured actions with the CloudBees platform can benefit your development team and software delivery process.

- 
Review our [preconfigured actions documentation](https://docs.cloudbees.com/docs/cloudbees-saas-platform/latest/configure/preconfigured-actions?_gl=1*15nfzvr*_ga*MTQwMDc3MjgxNS4xNjk4NzU2NTk2*_ga_37TX6SE1FC*MTcwODQzNjc1Ni44Ny4xLjE3MDg0Mzc0MDkuMC4wLjA.) for more detailed steps on using, adding, editing, and deleting preconfigured actions in CloudBees.

- 
Access our complete [catalog of CloudBees actions on GitHub](https://github.com/cloudbees-io).