Open jimsheldon opened 1 year ago
Hey @jimsheldon
I don't think this is an issue. The indentation is wrong in your example. Steps and parallel should inline. (I think)
`image: atlassian/default-image:3
pipelines:
default:
- parallel:
- step:
name: 'Build and Test'
script:
- echo "Your build and test goes here..."
- step:
name: 'Lint'
script:
- echo "Your linting goes here..."
- step:
name: 'Security scan'
script:
- echo "Your security scan goes here..."
`
more examples: https://support.atlassian.com/bitbucket-cloud/docs/parallel-step-options/
@eoinmcafee00 I don't think that yaml is valid, Atlassian provides a yaml validator here https://bitbucket-pipelines.atlassian.io/validator and that yaml doesn't seem valid.
My examples don't have consistent spacing, this might be clearer regarding the level of the steps
property:
image: atlassian/default-image:3
pipelines:
default:
- parallel:
steps:
- step:
name: 'Build and Test'
script:
- echo "Your build and test goes here..."
- step:
name: 'Lint'
script:
- echo "Your linting goes here..."
- step:
name: 'Security scan'
script:
- echo "Your security scan goes here..."
You can remove the steps
property and it is still a valid Bitbucket pipeline:
image: atlassian/default-image:3
pipelines:
default:
- parallel:
- step:
name: 'Build and Test'
script:
- echo "Your build and test goes here..."
- step:
name: 'Lint'
script:
- echo "Your linting goes here..."
- step:
name: 'Security scan'
script:
- echo "Your security scan goes here..."
But that yaml currently fails to convert:
./go-convert bitbucket bitbucket-pipelines.yml
2023/03/09 09:17:56 yaml: unmarshal errors:
line 6: cannot unmarshal !!seq into yaml.Parallel
This is a valid
bitbucket-pipelines.yaml
file:Conversion fails with this error:
The current conversion logic requires a
steps
property beneath theparallel
property.This yaml converts successfully:
We should update the logic to allow
steps
to be optional.