I have a repo that runs fine through pipelines with the following structure:
image: phpunit/phpunit:5.0.3 pipelines: branches: master: # Master is the release branch. Releases automatically propogate when tagged with a version number. - step: &testphp script: # CI unit test step. - apt-get update && apt-get install -y unzip - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - composer install - phpunit -c phpunit.xml dev: # Tests must pass on dev before going to release on master. - step: *testphp
This has been running without issue for quite some time. I recently forked the repo to give it a dedicated repository for public releases, and Pipelines is telling me that the syntax is not valid because dev does not have the required script key. It absolutely does, and the engine that runs pipelines has no issue discovering it through the yml alias.
However, whatever is authenticating the bitbucket-pipelines.yml before it has run at all is not parsing the yml correctly, and is apparently incapable of determining correct aliasing. This seems to only occur on a new repo that has not run pipelines at all yet, but detects a pipelines file.
This has caused problems getting my branches out of sync between the development master branch and the release master branch, because the site will not allow the repo to have ssh keys set without pipelines being configured when a pipelines file is present.
Relevant Uri Path:
(only fires on an initial visit for a new repo that already has a pipelines file as outlined above)
Repo where issue was noticed:
Steps to reproduce:
- Clone an existing repo locally
- Edit the bitbucket-pipelines.yml as shown above, so the step key is aliased between two branches.
- Push the repo to a new empty repository on Bitbucket Cloud
- Visit the Pipelines tab. You will see the apparent (misconfigured) error message.