💻 Tech
To share files with another steps in Bitbucket pipelines, you can use artifacts. In addition, you can use that to share data with other steps since you can’t share variables among the steps. One example is the use of temporary files.
definitions:
steps:
- step: build
script:
- echo 'some data' > somedata.txt
artifacts:
- somedata.txt
- step: deploy
script: echo $(cat somedata.txt)