The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Can I write a script command on multiple lines with Bitbucket Pipelines?

Sten Pittet
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 22, 2016

I have a long command and I'd like to break it down across multiple lines. Can I do that in my bitbucket-pipelines.yml configuration?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

8 votes
Answer accepted
Sten Pittet
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 22, 2016

Yes you can, by using block scalar styles with the folded style.

The example below shows you how to write a script command across multiple lines.

pipelines:
  default:
    - step:
        script:  # The command below is broken down in multiple lines
          - >
            ls -lh
            && pwd
TAGS
AUG Leaders

Atlassian Community Events