view outputs from atlassian/bitbucket-build-statistics:0.1.0

Deleted user December 2, 2020

Hi,

I'm new to pipelines, which is probably part of my issue.

 

Following the blog post introducing this pipe:

atlassian/bitbucket-build-statistics:0.1.0

 https://community.atlassian.com/t5/Bitbucket-Pipelines-articles/Bitbucket-Pipes-digest-October-2020/ba-p/1508196

 

I've created and deployed a pipeline using the template yaml file.

script:
  - pipe: atlassian/bitbucket-build-statistics:0.1.0
    variables:
      BITBUCKET_USERNAME: $BITBUCKET_USERNAME
      BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD

where I've used my username and app password.

The pipeline runs and completes successfully, but I do not see any report on build statistics. Where is the output shown?

I've also tried adding the filename option.

  script:
    - pipe: atlassian/bitbucket-build-statistics:0.2.0
      variables:
        BITBUCKET_USERNAME: $BITBUCKET_USERNAME
        BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
        FILENAME: "build_usage.txt"

Where would I find the output file?

 

1 answer

0 votes
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 3, 2020

@[deleted] it should be found inside current working dir in the pipeline.

How you're looking for it?

Try $(cat build_usage.txt) .

I executed this and succeeded.

 

Also, it depends on what should be done after. Now the pipe just outputs this to given file and to stdout, both.

Regards, Galyna

Deleted user December 3, 2020

@Halyna Berezovska

I run the pipeline from the bitbucket web page by clicking the "run pipeline" button at the top of screen.

this does not give me access to a terminal or to command prompt (or if it does, I don't know how to access them).

Without terminal access, I do not see the output to stdout, nor do I know how to access the file, since I don't know what filesystem the file is on or how to access that file system.

What filesystem does the pipeline run in? How do I access the file system?

The full pipeline is (the cut/paste destroyed the yaml indents)

# This is an example Starter pipeline configuration
# Use a skeleton to build, test and deploy using manual and parallel steps
# -----
# You can specify a custom docker image from Docker Hub as your build

environment.
image: atlassian/default-image:2

pipelines
:
custom:
getUsage:
-
step:
name: 'Get pipeline usage'
script:
-
echo "Running usage monitor.."
-
pipe: atlassian/bitbucket-build-statistics:0.2.0
variables:
BITBUCKET_USERNAME: XXX
BITBUCKET_APP_PASSWORD: XXXXXXX


 

Screenshot 2020-12-03 at 13.44.36.png

Deleted user December 7, 2020

Ok, I figured it out. If I look at the output of the build log, I can see that the pipe: atlassian/bitbucket-build-statistics ran for 21s. Clicking the little arrow on the far right opens the log output. The needed data is there, at the end of the log output.

Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 7, 2020

@[deleted] exactly. Contact us if you want to raise more questions.

Cheers, Galyna

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events