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
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!
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
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!
January 4, 2020

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

Seth Reno
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 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