ktomk / pipelines

Pipelines - Run Bitbucket Pipelines Wherever They Dock
https://ktomk.github.io/pipelines/
GNU Affero General Public License v3.0
109 stars 11 forks source link

cannot parse yaml files with dash as indentation #3

Closed mhewedy closed 5 years ago

mhewedy commented 5 years ago

Yaml spec 1.2 says:

The “-”, “?” and “:” characters used to denote block collection entries are perceived by people to be part of the indentation. This is handled on a case-by-case basis by the relevant productions.

However piplines fails when the file uses dash as identitation as follows:

pipelines:
  default:
  - step:
      name: Build and Test

it tells, theres no steps defined for default pipeline

mhewedy commented 5 years ago

I know it might be the problem of the underlying parsing library. but still, it is an issue in pipelines itself. and BTW the exact same file is considered correct by bitbucket.

ktomk commented 5 years ago

Your report is correct and the pipelines utility is actually missing the right pointer here for a better user experience:

Then there should be a message given that the php-yaml extension should be installed due to deficiencies w/ the fall-back parser which ships w/ the utility but which is not fully YAML conform.

In your case, please install the php-yaml extension as suggested by composer.json (which is a short-.sight, as the recommended phar build gives no hint or suggestion here) and try again. Installing the php-yaml extension should solve your problem, so I would love to get some feedback if or if not.

There should nothing else be needed to do than just to install the php-yaml extension.

mhewedy commented 5 years ago

The point is, I don't need to go in details of the installation procedure, so I took the easy way by downloading the PHP binary and just ran it. I might need to go the composer way.

Thanks.

ktomk commented 4 years ago

Pipelines since version 0.0.22 has a better YAML parser build in. Installing the PHP YAML extension does not hurt, but not installing should not hurt that much any longer.