ktomk / pipelines

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

Parallel step support for fail-fast and steps properties #25

Open mashurex opened 1 year ago

mashurex commented 1 year ago

When a parallel step is defined with the fail-fast and steps properties pipelines shows it as invalid.

Here is a sample that is perfectly valid and runs in BitBucket:

pipelines:
  custom:
    'custom-pipeline':
      - step: *stepA
      - parallel:
          fail-fast: true
          steps:
            - step: *stepB
            - step: *stepC

Pipelines does not allow the above and expects parallel steps to be defined only as an array, like this:

pipelines:
  custom:
    'custom-pipeline':
      - step: *stepA
      - parallel:
          - step: *stepB
          - step: *stepC
ktomk commented 1 year ago

@mashurex Thanks for the report, just seeing it is form November 07, 2022, have to take a look.

ktomk commented 1 year ago

@mashurex: I've pushed a new tag 0.0.68 to trigger the release with support for the new format, however the publishing service (Travis-CI) hangs. Therefore please download the current phar from the artifacts, all phars are identical, so you can pick the 5.3 or 8.1 one, it makes no difference: https://github.com/ktomk/pipelines/actions/runs/4745104720

The link is valid for a day or two, or better, that is the retention period for the build artifacts.

/edit: direct link:

phar-build-Linux-5.3 634 KB
phar-build-Linux-5.3 634 KB
mashurex commented 1 year ago

Thank you, I have downloaded the phar to test locally. I could also check out the tag and build it myself if that won't work for me. I have not viewed the change, but is it a matter of just updating the schema definition to whatever BitBucket has most recently published?

I ask because I have found that any of the tools I've tried to use that are based solely off of their published schemas don't necessarily validate correctly for all the ways BB pipelines actually allow one to be configured.

I was hoping to use just the --validate function of your library to basically do a pre-commit verification step as part of our workflow. IDEA doesn't properly recognize all of the schema variants, the Atlassian plugin for VS Code doesn't either, and their 'validation' web page; as best as I can tell, is a yaml linter that doesn't even check against their own schema.

Prior to finding your library, I was about to write my own that would first validate against a schema def and upon error dive into hand coded or supplementary schema variants.