Why can't I see the artifacts?

piotrpodyma November 20, 2018

Hi,

I run e2e tests on CI environment, but I cannot see the artifacts.

 

bitbucket-pipelines.yml:

imagecypress/base:10
options: max-time20
pipelines: 
    default: 
        -
step: 
            script
                - npm install 
                - 
npm run test 
            artifacts: 
                - 
/opt/atlassian/pipelines/agent/build/cypress/screenshots/* 
                - 
screenshots/*.png
                - **/*.png

 

2018-11-19_12h32_49.png2018-11-19_12h35_08.png
Maybe I typed the wrong path, but I am not sure. Does anyone have any ideas what I am doing wrong?

 

4 answers

1 vote
Sabin.Ranjit June 24, 2020

Hi
I'm facing the similar issue, step 1 produces .tar , step 2 can find it and use it but step 3 does not find the artifact at all. :(
any solution yet?

 

thanks

0 votes
Annet Andrew June 15, 2021

hi guys, 
 I have tried what @Philip Hodder mentioned above and it's working this is my solution
 this is the custom pipeline in my bitbucket config file to run cypress.
please try cypress/screenshots/**/*.png in artifact section

"cypress:pipeline": "cypress run --env user=${E2E_USER_EMAIL},pass=${E2E_USER_PASSWORD} --browser chrome --spec cypress/integration/src/**/*.spec.ts"
pipelines:
custom:
healthCheck:
- step:
name: Integration and E2E Test
script:
- npm install
- npm run cypress:pipeline
artifacts:
# store any generated images as artifacts
- cypress/screenshots/**/*.png
0 votes
tatenda August 5, 2020

Same issue here. Any solution yet @Philip Hodder 

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 2, 2018

Hi Piotr,

What do you see if you list the content of directories?

imagecypress/base:10
options: max-time20
pipelines: 
    default: 
        -
step: 
            script
                - npm install 
                - 
npm run test
- ls -R /opt/atlassian/pipelines/agent/build/cypress/screenshots
- ls -R screenshots
- ls -R
            artifacts: 
                - 
/opt/atlassian/pipelines/agent/build/cypress/screenshots/* 
                - 
screenshots/*.png
                - **/*.png

What are in the logs listed in your 'Build Teardown'? Is there any reference to artifacts?

Thanks,

Phil

piotrpodyma December 3, 2018

Hi Philip Hodder,

Thank you for the answer.
I tried very many different cases to get screenshots, but it still doesn't work, even with your suggestion, and I have not any idea why, what wrong could be with it?

 

Thanks,
Piotr

Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 3, 2018

Can you post the log output for a build using the configuration I provided? We can use that to debug further.

piotrpodyma December 5, 2018

I tried as you wrote. When every pipeline (tests) failed then I always got this message:

2018-12-05_12h36_50.png

What I'd like to do is to see screenshots when something went wrong.
Artifacts tab is still blank

Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 5, 2018

Can you try this YAML instead?

imagecypress/base:10
options: max-time20
pipelines: 
    default: 
        -
step: 
            script
                - npm install 
                - 
npm run test 
            artifacts: 
                - 
/opt/atlassian/pipelines/agent/build/cypress/screenshots/** # Double star provides recursive search.

If that doesn't work. Can you take a screenshot of the 'Build Teardown' section, as there is a 1GB file size limit for artifacts, and you may be hitting it.

e.g.

Screen Shot 2018-12-06 at 10.46.51 am.png

piotrpodyma December 17, 2018

I tried change artifact's path to many different options, but nothing helps. Here is an example of 'Build teardown':

image.png

I also tried to add: 

- set +e npm run test

to 

bitbucket-pipelines.yml

to pass pipeline, but nothing happened, and every time I get the result as shown above

Former user June 13, 2019

Hi @piotrpodyma ! Do you have any success results (get screenshots)?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events