Manually run your Bitbucket Pipelines

In the earlier post, we have talked about how to test your Laravel  application with Bitbucket Pipelines, but sometimes you may need to run the tests on specific commit and not after you push it, luckily for us Bitbucket Pipelines team has implemented the custom section in the ymal file, which helps us to do so.

It does not differ that much from what we already have, so adding the following to our file which we created in the earlier  post will enable us to manually run the pipeline:

First of all, we start the section by the word custom which defines that this is the things that I’ll need to execute when I run the manual execution, the second line defines the name of the custom run, and this is so important other wise the pipelines will not recognise it. Here I’ve called it manual-run but you can name it what ever you want, and the rest is something you already familiar with.

After pushing your modification, you can go to that commit and find that now you can run the custom pipeline like the following:

Now if you have more than one custom section, you will see them all listed here and you can choose which one you want to run. So our full file should be something like the following

And that’s all, but you should always refer to Pipelines documentation as they always add new features and fix bugs.

Filed under: Code, docker, PHP

No comment yet, add your voice below!


Leave a Reply