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
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?
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.
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.