Details
-
Bug
-
Resolution: Not a bug
-
Low
Description
Problem
The Bitbucket bitbucket-pipelines.yml validator is not properly validating a command if it starts with the bash test command ”[[ expression ]]”.
Steps to reproduce
Create a a pipeline with a test like shown in the image above
Workaround
Wrap up the test command with an IF command like described below.
The command:
{{[ $BITBUCKET_BRANCH =~ [A-Z][a-z]+-[0-9]
{2,} ] && export BRANCH = $BASH_REMATCH[0]}}Will become:
{{if [ $BITBUCKET_BRANCH =~ [A-Z][a-z]+-[0-9]{2,}
]; then export BRANCH = $BASH_REMATCH[0]; fi}}