Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Artifacts keeps only the last in the array

Johan Karlsson July 27, 2021

I have a pipeline step that looks as follows:

- step: &build-generic
name: Build generic app
script:
- npm install
- npm run build:generic
artifacts:
- dist/**
- parcel-bundle-reports/**

I just recently added the artifact for the parcel-bundle-reports folder and that broke later steps in the pipe because dist was no longer available as an artifact.

However, when I run this, I get only the last folder added as an artifact:

artifact.png

What's going on here? The documentation looks almost identical.

Update

We have other pipelines that do the same thing without issue:artifacts.png

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 28, 2021

Hi Johan,

When you're viewing a Pipelines build, there's an icon with a cog image. If you hover it, you'll see the text "View configuration" like below:

Screenshot 2021-07-28 at 14.13.15.png

If you select it, you'll see the yaml file used for this specific build. My first suggestion would be to select that for the build that failed, and double-check that - dist/** is indeed included in the artifacts definition for the step that should generate them.

I have seen cases where the yaml file gets edited in different branches, so we first want to make sure that the yaml for this specific build includes - dist/** in the artifacts definition.

 

If that looks ok, the second thing to check would be if the dist directory exists in the directory where the repository is cloned. It is possible that the directory dist does not exist, or that it exists inside another directory, or that it has no contents.

You can add the command ls -lahR at the end of the script that generates the artifacts and check its output in the next build that runs, to confirm if the dist directory is listed there and if it has any contents.

 

If all looks good with the yaml file, and the command ls -lahR shows that the directory dist exists in the clone directory and has contents, my next suggestion would be to open a ticket with the support team. If there is a support ticket open, the engineer working on your case will be able to access the build and investigate the issue.

I see that you're a member of a workspace on a paid plan that uses Pipelines, so you should be able to open a support ticket yourself if the issue concerns this workspace. You can open a support ticket via https://support.atlassian.com/contact/#/, in "What can we help you with" select "Technical issues and bugs" and then Bitbucket Cloud as product. Make sure to include the URL of the build that has this issue in the details of the ticket.

 

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events