"Error in bitbucket-pipelines.yml: Script Section Should Be a List"
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
The error in the bitbucket-pipelines.yml file occurs at the specified location and indicates that the `script` section should be a list instead of a scalar value.
Correcting this issue by formatting the `script` section as a list will resolve the error and allow for the proper execution of the Bitbucket Pipelines configuration.
Cause
The error message suggests that there is an issue with the syntax or formatting of the bitbucket-pipelines.yml file in the pipelines > custom > test > 0 > step > script section.
Specifically, it indicates that the script section should be defined as a list, but it is currently defined as a scalar value.

1
2
3
4
5
6
7
pipelines:
custom:
test:
- step:
script:
echo "First command"
- echo "Second command"
Solution
In Bitbucket Pipelines, the script
section is typically used to define the commands or scripts that need to be executed for a particular step. It should be written as a list, where each item in the list represents a separate command or script.
To fix the error, you should ensure that the script
section is defined as a list. Here's an example of how it should be formatted:
1
2
3
4
5
6
7
8
pipelines:
custom:
test:
- step:
script:
- echo "First command"
- echo "Second command"
If the above instructions do not assist in resolving the issue, please raise a support ticket or raise a community support ticket for further assistance with this.
Was this helpful?