Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how can i move a directory from one step to next one

soydan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 16, 2018

Hi,

(before this was a question, but now simple answer for old simple question)

image: maven:3.5.2
pipelines: default:

   - step:

      name: Package client application and copy to backend 

      image: node:6.11.4

      script:

         - cd frontend 

         - yarn install

         - yarn build

         - mkdir ${BITBUCKET_CLONE_DIR}/frontend_scripts

         - cp -R frontend/build/* $BITBUCKET_CLONE_DIR/frontend_scripts/

      artifacts:

         - frontend_scripts/**

   - step:

      name: Build backend

      script:

         - rm -rf backend/src/main/resources/static/*

         - cp -R frontend_scripts/* backend/src/main/resources/static

         - rm -R ${BITBUCKET_CLONE_DIR}/frontend_scripts

         - cd backend

         - mvn -B clean package 

 

1 answer

1 accepted

0 votes
Answer accepted
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 6, 2018

(I'm just commenting and marking as answered so anyone searching can see this is resolved from the search results. Good job figuring it out)

Answer copied from above:

Hi,

(before this was a question, but now simple answer for old simple question)

image: maven:3.5.2
pipelines:
default:
- step:
name: Package client application and copy to backend
image: node:6.11.4
script:
- cd frontend
- yarn install
- yarn build
- mkdir ${BITBUCKET_CLONE_DIR}/frontend_scripts
- cp -R frontend/build/* $BITBUCKET_CLONE_DIR/frontend_scripts/
artifacts:
- frontend_scripts/**
- step:
name: Build backend
script:
- rm -rf backend/src/main/resources/static/*
- cp -R frontend_scripts/* backend/src/main/resources/static
- rm -R ${BITBUCKET_CLONE_DIR}/frontend_scripts
- cd backend
- mvn -B clean package

 

Link to related documention: https://confluence.atlassian.com/bitbucket/using-artifacts-in-steps-935389074.html 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events