Forums

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

Issue with BitBucket pipeline YAML syntax

GC August 5, 2018
image: python:3.5.1

pipelines:
  custom:
    default:
      - step:
          caches:
            - pip
          script:
            - pip install awscli
            - aws ssm send-command --document-name "AWS-RunRemoteScript" --instance-ids "i-xxxxx" --parameters '{"sourceType":["S3"],"sourceInfo":["{\"path\": \"https://s3.us-east-2.amazonaws.com/my-bucket-name/test.ps1\"}"],"executionTimeout":["3600"]}' --timeout-seconds 600 --region us-east-2

I have created a bitbucket-pipelines.yml file to test a powershell script that can run on remote AWS instance. When i try running it, i get the following error message for the last line:

"The 'script' section in your bitbucket-pipelines.yml file must be a list of strings".

I checked the syntax with other online YAML validators and it shows fine. Not sure why BitBucket is having issue. Any pointers?

1 answer

1 accepted

0 votes
Answer accepted
GC August 7, 2018

Got the answer from SO.

"sourceInfo":["{\"path\": \"https://s3.us-east-2.amazonaws.com/my-bucket-name/test.ps1\"}"]

Issue was with space before the \"https... string. Removing it fixed the issue

"sourceInfo":["{\"path\":\"https://s3.us-east-2.amazonaws.com/my-bucket-name/test.ps1\"}"]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events