You can attach any file to a build as an artifact with Bitrise, even files that you generate during the build. Deployed Artifacts appear on the Build’s page, in the Artifacts & Apps
section, and anyone who has access to the Build page can download it from there.
We’ll go through an example of how to do this.
-
Add a
Deploy to Bitrise.io
Step to your workflow.If you want to attach a file you generated during the build, add this Step after the Step that generates the file or makes it available. Otherwise it can be at any point
-
Change the
Deploy directory or file path
input of the Step to the path of the file you want to deploy. An example in yaml format:- deploy-to-bitrise-io: inputs: - deploy_path: "/var/log/system.log"
-
Run your build.
That’s it! Your next build will attach your file - in our example, the OS X system log file - to your build and you will see on the Build’s page.
Deploying to a directory ⚓
The Deploy to Bitrise.io
Step accepts both file and directory paths as its input, but by default it does not deploy files recursively, from sub directories if you specify a directory as its deploy_path
input.
If you want to do that and deploy the whole directory with every sub directory and the files in the sub directories, you have to enable the “Compress” option of the Step.
In this mode the Step will compress (zip) the whole directory, and deploy the compressed file, instead of deploying files one by one.
An example configuration:
- deploy-to-bitrise-io:
inputs:
- deploy_path: /deploy/this/directory/recursively
- is_compress: 'true'