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
(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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.