Bitbucket Pipelines Error Log

Is there any way to see the error log that happens in the pipeline?

Here's my YAML file

# This is a sample build configuration for PHP.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Dockerhub as your build environment.
image: phpunit

pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - composer install
          - phpunit --bootstrap ./autoload.php --no-configuration src/tests


The build is failing but when I do the exact command in my development - "phpunit --bootstrap ./autoload.php --no-configuration src/tests". It works properly.

Having able to see the logs will really help. 

 

1 answer

0 vote

Hi Michael,

You can view the logs of all your pipelines by navigating to the Pipelines page:

step1.png

You can then select the pipeline you wish to see the logs of: 

step2.png

The logs are output here, you may need to click on the 'phpunit' or 'composer install' commands to expand the logs:

step3.png

If you require more logging, you can try and add the --verbose flag to phpunit. i.e use this script instead:

# This is a sample build configuration for PHP.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Dockerhub as your build environment.
image: phpunit
 
pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - composer install
          - phpunit --verbose --bootstrap ./autoload.php --no-configuration src/tests

You may want to try this guide as well https://answers.atlassian.com/questions/39230190 As there are some possible variations that could cause your build to pass locally but fail in Bitbucket Pipelines. For example, caching of dependencies or the 2Gb memory limit on the build.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,048 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you