No Artifacts Upload during Build Step
Asked by Alex Nowak:

Hi everyone,

I created a bitbucket-pipelines.yml file and added a step in order to build frontend assets before transfering files to a server.

I cannot use rsync (pls don't ask why or recommend me using it. I just can't) and instead use scp.  
But the problem lies within my build step, because it doesn't seem to upload artifacts which I then can transfer on my remote host system.

Here is a snippet of my pipelines file:

```
- step:
      name: Build
      image: node:10.16.0
      caches:
          - node
      script:
          - cd front-end
          - npm install
          - npm i gulp -g
          - gulp build --production
      artifacts:
          - public/dist/**
- step:
        name: Deploy Repository files using SCP to Staging
        deployment: staging
        script:
            -   pipe: atlassian/scp-deploy:0.3.12
                variables:
                    USER: '$DEPLOY_USER'
                    SERVER: '$DEPLOY_HOST'
                    REMOTE_PATH: '$DEPLOY_PATH_STAGING'
                    LOCAL_PATH: '$BITBUCKET_CLONE_DIR/'
                    DEBUG: 'true'
```

This is the output  
![Bildschirmfoto 2020-09-16 um 16.46.45.png](https://community.atlassian.com/t5/image/serverpage/image-id/110595i133ADF90CD199DDD/image-size/large?v=v2&px=999 "Bildschirmfoto 2020-09-16 um 16.46.45.png")  
What am I missing that my Build step can't seem to be able to upload artifacts?  
Any ideas?

Best regards  
Alex


Answers:
author: Jimmy Seddon
body: Hi [@Alex Nowak](/t5/user/viewprofilepage/user-id/3896257),

Welcome to the Community!

I'll admit that I'm not 100% familiar with BitBucket Pipelines as our company uses a Bamboo server. However, we do use YAML specs for our build plan configurations and a number of things look similar.

Looking at the documentation for pipeline artifacts here:   
<https://support.atlassian.com/bitbucket-cloud/docs/use-artifacts-in-steps/>

I see the statement: "Artifact paths are relative to the `BITBUCKET_CLONE_DIR.`"

I know when I have been setting things up myself, this can be the bane of my existence as well. My first thought would be to check and make sure that "- public/dist/\*\*"

Is actually the relative path you are expecting to get artifacts from. You could also test this by adding a second definition for a file that you know will exist in the root of the `BITBUCKET_CLONE_DIR just to make sure that artifacts are actually being discovered and saved as a part of the build step.`

Those would be the spots I'd start looking fist.

I hope that helps!

-Jimmy

comments: author: Srikanth Mamidala
body: [@Alex Nowak](/t5/user/viewprofilepage/user-id/3896257) were you able to find a solution for this? I am also facing the same issue. Target folder has the artifacts but they are not being uploaded to the artifacts tab to be able to use them in next steps.


author: Omkar posam
body: [@Jimmy Seddon](/t5/user/viewprofilepage/user-id/512822) Hi I have a different issue can you address it please....<https://community.atlassian.com/t5/Bitbucket-questions/Pipeline-artifact-issue/qaq-p/2231012#U2231412>


Tags: bitbucket-cloud

bitbucket-pipelines

cloud