New feature: Custom Actions ðŸ›
The transition to a more modular user interface allowed us to accommodate features in clear and compact space. With a hundred and fifty actions already in place covering most of the DevOps landscape, we now decided to give our users complete freedom with the ability do define their own fully customized actions. Of course, that doesn't mean we're not going to add new actions anymore – far from that. All we want to do is invite you to the party. 😎
How it works
Custom actions are defined in a special YAML file stored in your repository. All you need to do is push the definition and the icon of the action to the default branch, and, once successfully parsed, the action lands at the top of your action list in all splendour and glory, its tabs shining like your new Twitter badge, its inputs sparkling prompt messages, your very own custom icon shouting "look at me, it is I who did it". You are free to add any number of tabs and inputs, customize images, commands, and labels, and tune the action to whatever your workflow requires.
Image loading...
Example
Here we can see the configuration of a simple action launched in the Node environment:
yamlname: "My_Ping_Action" inputs: ip: required: true count: default: '1' execute_commands: - ping $ip -c $count docker_image_name: "node" docker_image_tag: "16"
- The action runs ping on the IP address defined by the user.
- The IP input is mandatory, and the default number of retries (
count
) is set to 1. - The titles of the inputs are reproduced into variables and used in the execution command as
$ip
and$count
.
Once added to the repository, the action is rendered top-to-bottom into the GUI:
Image loading...
And here we can see the results of the execution in the action's logs. All works!
Image loading...
Use case
And here's a more real-life example. Let's assume that your team is using a task management system like Asana. The goal is to keep your team informed whenever an important pipeline fails by issuing a task in Asana with the link to the failed execution.
Normally, it would require running a method with curl in the Asana's API. However, the drawback of this solution is that you need to define API calls in actions such as Local Shell or Custom Build, and whenever something changes on the Asana's side, the scripts stop working and need to be updated manually. So, instead, you just need to define one action that will issue a task in Asana, and use it across the workspace.
Action preview
Image loading...
Configuration
yamlname: "new_task" inputs: title: type: TEXT default: "title" assignee: type: SELECT required: true options: - "Alexander" - "Mike" - "Anna" - "John" content: type: TEXTAREA required: true execute_commands: - run docker asana_custom docker_image_name: "my_company/asana_custom" docker_image_tag: "latest" tabs: projects: name: type: SELECT required: true options: - "Project-1" - "Project-2" - "Project-3" - "Project-4"
Jarek Dylewski
Customer Support
A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.