Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected Property Error on Validation of Valid YAML

David Cano
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 20, 2018

I followed the documentation exactly and the YAML Linter validates this is valid YAML. And it looks exactly like the example. However, the validator says my -step needs a script, but then says my "script:" is an unexpected property. But only on "master:". What am I missing?

 

# This is a sample build configuration for Other.
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: johnjvester/docker-salesforce

pipelines:
default:
- step:
name: Compiling and Running Tests on Bitbucket1
script:
- echo "Running Tests on Bitbucket1 as $SF_USERNAME"
- ant -buildfile build/build.xml deployCodeRunLocalTests -Dsf.username=$SF_USERNAME -Dsf.password=$SF_PASSWORD -Dsf.serverUrl=$SF_SERVERURL -Dsf.checkOnly=true -Dsf.testLevel=RunLocalTests
branches:
master:
- step:
name: Compiling and Running Tests on Bitbucket1
script:
- echo "Running Tests on Bitbucket1 as $SF_USERNAME"
- ant -buildfile build/build.xml deployCodeRunLocalTests -Dsf.username=$SF_USERNAME -Dsf.password=$SF_PASSWORD -Dsf.serverUrl=$SF_SERVERURL -Dsf.checkOnly=true -Dsf.testLevel=RunLocalTests
- step:
name: Deploying to Bitbucket1
deployment: test
trigger: manual
script:
- echo "Deploying to Bitbucket1 as $SF_USERNAME"
- ant -buildfile build/build.xml deployCode -Dsf.username=$SF_USERNAME -Dsf.password=$SF_PASSWORD -Dsf.serverUrl=$SF_SERVERURL -Dsf.checkOnly=false -Dsf.testLevel=RunLocalTests
feature/*:
- step:
name: Compiling on Bitbucket1
script:
- echo "Compiling on Bitbucket1 as $SF_USERNAME"
- ant -buildfile build/build.xml deployCodeCheckOnly -Dsf.username=$SF_USERNAME -Dsf.password=$SF_PASSWORD -Dsf.serverUrl=$SF_SERVERURL -Dsf.checkOnly=true -Dsf.testLevel=NoTestRun

1 answer

0 votes
Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2018

Hi @David Cano,

unfortunately the formatting here is not ideal (since YML is whitespace sensitive). Would you mind create a snippet and share a link here? 

David Cano
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 10, 2018

Thank you Jeroen! You are 100% correct. My issue was that whitespace sensitivity. My attributes needed to be tabbed in one more tab. As soon as I did that, it was fine.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events