Following the example in
https://support.atlassian.com/bitbucket-cloud/docs/deploy-build-artifacts-to-bitbucket-downloads/
I am attempting to upload into the download area of BitBucket
Followed directions until I get to step 3a
Pasted that into my pipeline
I get the following error
✖ File frontend/build/.zip doesn't exist.
I am assuming that this is because variables do not carry over from 1 step to the next.
My question is how do I get the artifact into the next step?
Where is the docker container going to have its root directory?
Here is my pipeline
image: node:lts
pipelines:
pull-requests:
'**':
- step:
name: Build APP on Pull Requests
caches:
- nodeall
- yarn
script:
- cd frontend
- yarn
- CI=$process_env_ci_pull_request yarn run build
- cd build
- zipfile="AR5-$BITBUCKET_BUILD_NUMBER"
- uname="$BITBUCKET_USERNAME"
- pwd="$BITBUCKET_APP_PASSWORD"
- echo $zipfile
- python -c "import shutil;shutil.make_archive('$zipfile','zip',root_dir='.')"
- dir
#- curl -X POST "https://${BITBUCKET_USERNAME}:${BITBUCKET_APP_PASSWORD}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@frontend/build/${zipfile}.zip
artifacts:
- ${zipfile}.zip
- step:
script:
- pipe: atlassian/bitbucket-upload-file:0.3.3
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: "frontend/build/AR-${$BITBUCKET_BUILD_NUMBER}.zip"
definitions:
caches:
nodeall: ./node_modules
yarn: /usr/local/share/.cache/yarn