Hey All!
I'm pretty new to bitbucket pipelines, so the following may seem trivial but anyway..
Tryin to declare the following bitbucket-pipelines.yml file:
definitions:
steps:
- step: &black
name: Black Format Check
image: python:3.7
script:
- pip install black
- black --check .
- step: &mypy
name: mypy Check
image: python:3.7
script:
- pip install mypy
- mypy src
- step: &flake8
name: flake8 Lint Check
image: python:3.7
script:
- pip install flake8 flake8-bugbear
- flake8 -v .
- step: &pylint
name: pylint Lint Check
image: python:3.7
script:
- pip install pylint
- pylint src
pipelines:
pull-requests:
feature/*:
- parallel:
- step: *black
- step: *mypy
- step: *flake8
- step: *pylint
But the pycharm states that
Schema validation: Property 'parallel' is not allowed
Interesting considering when checked using the online validator I see it's valid :\
Have I miss used yaml anchors?
Thanks in advance for your help :)
Hi @Nativ Issac ,
Welcome to the community!
Will you please have a look at this documentation and follow it!
https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/
Some ore resources
Regards,
Soumyadeep
@Soumyadeep Mandal - SaM Thanks a lot!
Appreciate your quick & informative response :)
For the record, problem was that I declared the steps as list items.
Fix was to convert them to sub keys:
definitions:
black-step: &black
name: Black Format Check
image: python:3.7
script:
- pip install black
- black --check .
mypy-step: &mypy
name: mypy Check
image: python:3.7
script:
- pip install mypy
- mypy src
flake8-step: &flake8
name: flake8 Lint Check
image: python:3.7
script:
- pip install flake8 flake8-bugbear
- flake8 -v .
pylint-step: &pylint
name: pylint Lint Check
image: python:3.7
script:
- pip install pylint
- pylint src
pipelines:
pull-requests:
feature/*:
- parallel:
- step: *black
- step: *mypy
- step: *flake8
- step: *pylint
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nativ Issac ,
I'm currently facing an issue similar to yours and I'm not sure how your solution fixed the issue.
I understand that you changed your step definitions from an array to mapped objects, but this should't affect the referenced object.
In both exemple, *black should have the same value.
Note: I just saw that in your first example, the indentation for the step is wrong (i think)
definitions:
steps:
- step: &black
name: Black Format Check
Should be:
definitions:
steps:
- step: &black
name: Black Format Check
Cheers,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Francis Poulin Hi, thanks for letting me (and perhaps some more future readers) know.
Our pipelines are already implemented in the mapped objects approach and it does not bother me that much..
Have not checked your suggestion, but I hope it suites your needs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.