Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Trigger action in nodeRed on failed pipeline

Mikka Kummer October 17, 2022

I'd like to send a signal (MQTT?) to a node Red server when a pipeline fails, I'm not sure if a pipeline can send MQTT signals directly or if there needs to be a work around

1 answer

2 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 18, 2022

Hello @Mikka Kummer ,

Welcome to the Atlassian Community!

In bitbucket pipelines, we basically provide you with a linux container where you can essentially execute the same shell commands and scripts you execute locally.

So if you have a script or an MQTT CLI that you use locally to send signals to an external server, you should be able to execute the same commands in the pipelines, as long as you install these dependencies/programs in the docker image you are using in your build.

There are already some images in Dockehub which implements MQTT, such as the Eclipse-Mosquitto , which you can use in your build step. However, you also have the option to build your custom image with all the dependencies your project needs, including, for example, an MQTT CLI to connect to your external server.

Hope that helps! Let me know in case you have any questions.

Thank you, @Mikka Kummer .

Kind regards,

Patrik S

Mikka Kummer October 20, 2022

Thanks for your quick reply, this already helped a lot.

I'm not quite sure how I can check if something/what fails in the pipeline and how I can react to the error with my script

Kind regards, Mikka Kummer

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 20, 2022

Hello @Mikka Kummer ,

You can first try to run your build locally in a docker container, to simulate the same environment as pipelines. We have the following tutorial on how to run a build locally: 

once you have everything tested and set up locally, you can use the same commands and docker image to configure your bitbucket-pipelines.yml file and run it in the pipelines infrastructure.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events