How to set preconfigured actions in the CloudBees platform
Drew Piland
Posted on February 26, 2024
Previously, we described concepts associated with our Composer UI for creating workflows within the CloudBees 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 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 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) 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
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 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.
Getting started
Preconfigured actions are another way the CloudBees platform enhances security, speed, and efficiency for developers. Start using CloudBees for free.
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 for more detailed steps on using, adding, editing, and deleting preconfigured actions in CloudBees.
Access our complete catalog of CloudBees actions on GitHub.
Posted on February 26, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.