Artifact doesn't upload during the build process

Carbajal March 30, 2021

Hi, I have this issue: basically the pipeline failed when the Deploy step is executed, because it can't find the dist folder. Meaning LOCAL_PATH can't find that directory. 

In fact, you can see that in Artifacts tab is empty.

My root project is compose of:

- docker folder

- source folder -> this one contains my Vue App. [public, src, package.json, etc]

bitbucket-pipelines.yml

 

Could anyone please help me out to resolve the issue. Or please let me know where I am doing wrong. Thank you

 

Screenshot 2021-03-30 at 11.12.58.png

Screenshot 2021-03-30 at 11.07.04.png

Screenshot 2021-03-30 at 10.45.40.png

Screenshot 2021-03-30 at 10.46.46.png

1 answer

1 accepted

1 vote
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 2, 2021

Hi @Carbajal  and welcome to the community.

Does the dist folder already exist in your repo, or is it generated during the build with the npm run build command?

I can see in the script of your first step that you first change directory to source and then run npm install and npm run build. So, if the folder is generated by the latter command, I believe it will be generated inside the source directory.

If this is the case, I believe you need to include that in the path for both artifacts and also the pipe:

So, in your bitbucket-pipelines.yml file, in the build step, you'll need to define:

artifacts:
  - source/dist/**

and in the second step, in the pipe definition:

LOCAL_PATH: 'source/dist'

Could you give this a try and let me know if it works for you?

Kind regards,
Theodora

Carbajal April 9, 2021

Many thanks, It worked!

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2021

That's good to hear, thank you for the update and you are very welcome!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events