I wrote a basic python script for testing bitbucket-pipelines.yml files locally:
This allows you to test a bitbucket-pipelines.yml file locally without pushing it to a repository.
The 'script' blocks in each step run as a powershell script.
Example usage:
python bitbucket_pipelines_test.py "Pipeline step 1" --env env.json
This is not an issue report. I was sharing a script I use for local testing of pipelines. I posted this to share with other users. I guess my description was lacking.
I find it difficult to test a powershell script before putting it into the script block of the bitbucket_pipelines.yml file since you often have to put quotes around some lines and it's never as simple as just putting the '-' in front of all your script lines.
The point of my powershell script is to read the script blocks from the yml file and let you execute them for testing without having to push your working copy and wait for the pipeline to get to the script block you are working on. And catching the .yml parse errors when you copying from a powershell script into the .yml file.