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

Single command over multi-line in script section?

Mark Faulkner November 19, 2019

I'm trying to wrap a long command in my bitbucket-pipelines.yml.  

Here's the section that is causing the problem. I'm using the folding style, and the pipeline validator says it is valid... 

         script:
- >
aws lambda update-function-code
--function-name RDSEventsToSNS
--s3-bucket s3Bucket
--s3-key lambda/RDSEventToSNS.zip

In the log I get this result:

aws lambda update-function-code --function-name RDSEventsToSNS --s3-bucket s3Bucket --s3-key lambda/RDSEventToSNS.zip

+ aws lambda update-function-code
--function-name RDSEventsToSNS
--s3-bucket s3Bucket
--s3-key lambda/RDSEventToSNS.zip
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: the following arguments are required: --function-name

The log shows the command glued together properly, but it still fails?

Any suggestions?

1 answer

1 vote
Joshua Dyck January 4, 2020

Have you tried removing the indentation before the -- on each line?

Seth Reno August 23, 2023

Thanks! Removing the extra indentation worked in my case. e.g.

script:
- >-
msbuild
SomeProject.csproj
/p:Configuration=Release
/p:Platform=AnyCPU
 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events