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 Leaders.
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

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 Leaders.
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

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, forge, forge learning path, atlassian learning, cloud app development, forge app development, build forge apps, atlassian certification, developer training, jira app development, confluence app development, automation, ui frameworks

Turn Ideas into Atlassian Apps 📱

From setup to deployment—this learning path shows you how to build your first app using Forge. Learn the essentials, streamline workflows, and bring custom solutions to life across Jira, Confluence, and more.

Start Learning
AUG Leaders

Atlassian Community Events