Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

"Schema validation: Property 'variables' is not allowed" error in bitbucket-pipelines.yml

Danny Chia May 30, 2023

I've set up a pipeline to allow a user to repeat a test a specific number of times. It looks something like this:

 

image: python:3.11.0

definitions:
caches:
pip3: /usr/local/lib/python3.11/site-packages
steps:
- step: &setup
name: 'Install dependencies'
caches:
- pip3
script:
- python3 -m pip install --upgrade pip
- pip install -r requirements.txt

pipelines:
custom:
run_tests:
- variables:
- name: iterations
default: 1
- step: *setup
- step:
name: 'Run tests'
caches:
- pip3
script:
- |
for i in `seq 1 $iterations`;
do
python run_tests.py
done

artifacts:
- outputs/**

 However, PyCharm gives me this error:

Schema validation: Property 'variables' is not allowed

I don't know if the issue is with PyCharm or something else, but there are no problems after the code, and the pipeline runs fine. Anyone know what's causing this?

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2023

Hi Danny and welcome to the community!

I see no issues with your bitbucket-pipelines.yml file, the definition of the variables in the custom pipeline looks correct and according to our docs.

I'm not sure why PyCharm shows an error and how they do this validation; it may be best to reach out to the support team of the product if you'd like to get more info on that.

You can use our validator for bitbucket-pipelines.yml if you want to check the validity of your bitbucket-pipelines.yml file:

Kind regards,
Theodora

Danny Chia May 31, 2023

Thanks for the response. I ran the file through the validator, which shows no problems. I suspect it is a PyCharm issue.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 2, 2023

You are welcome Danny, I suspect this may be the case as well.

Please feel free to reach out if you ever need anything else!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events