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?
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\"}"]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.