Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,836
Community Members
 
Community Events
168
Community Groups

Extract files from artifacts folder dist/**

Hello guys, I have a question and I hope someone can help me!

I have this pipeline:

#bitbucket-pipelines.yml
image: node:latest

pipelines:
  default:
    - step:
        name: Build VUE Project
        caches:
            - node
        script:
            - yarn install
            - yarn run build
        artifacts:
          - dist/**
    - step:
        name: Deploy to CPANEL
        deployment: production
        script:
          - pipe: (....something)
            variables:
              USER: $ftp_user
              PASSWORD: $ftp_password
              SERVER: $ftp_host
              REMOTE_PATH: $ftp_remote_path

It works and when pipeline is completed in my server prod i found my folder dist with my app.

But I would only files inside the folder dist.

I imagine to have in my root folder server production all files inside dist and not the folder dist(with all files inside).

Someone have some suggestions? Thank you 

1 answer

1 accepted

0 votes
Answer accepted

For everyone will have same problem the solution is to add this line inside step:

LOCAL_PATH: 'dist' 

So, only the content of the directory dist will be deployed! Have a nice coding day :)

I'm trying to do this same thing, but can you just clarify where you put LOCAL_PATH? was it under the artifacts section? I'm trying variations but haven't found one that works just yet...

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

3,449 views 3 10
Read article

Atlassian Community Events