icon

Deploy to Bitrise.io - Build Artifacts, Test Reports, and Pipeline intermediate files

Deploys build artifacts to make them available for the user on the build's Artifacts tab. Sends test results to the Test Reports (build's Tests tab). Uploads Pipeline intermediate files to make them available in subsequent Workflows and also uploads Bitrise and user generated html reports.

The Step accesses artifacts from a directory specified as the $BITRISE_DEPLOY_DIR where artifacts generated by previous Steps gets stored. These artifacts are then uploaded on the Artifacts tab of any given build. For installable artifacts, such as IPAs or APKs, the Step can create a public install page that allows testers to install the app on their devices. You can also use the Step to notify users about the build. If you wish to use the Test Reports, you must add this Step in your Workflow since the Step converts test results to the right format and sends them. The Step can also share Pipeline intermediate files. These files are generated by Workflows in a Pipeline intended to be shared with subsequent Workflows. Also it collects and uploads all of the html reports located in the BITRISE_HTML_REPORT_DIR folder.

Configuring the Build Artifact Deployment section of the Step

  1. Set the value for the Deploy directory or file path required input. The default value is the $BITRISE_DEPLOY_DIR Env Var which is exposed by the Bitrise CLI. If you provide a directory, everything in that directory, excluding sub-directories, gets uploaded. If you provide only a file, then only that file gets uploaded. To upload a directory's content recursively, you should use the Compress the artifacts into one file? which will compress the whole directory, with every sub-directory included.
  2. Set the value of the Notify: User Roles input. It sends an email with the public install URL to those Bitrise users whose roles are included in this field. The default value is everyone. If you wish to notify based on user roles, add one or more roles and separate them with commas, for example, developers, admins. If you don't want to notify anyone, set the input to none.
  3. Set the Notify: Emails sensitive input. It sends the public install URL in an email to the email addresses provided here. If you’re adding multiple email address, make sure to separate them with commas. The recipients do not have to be in your Bitrise team. Please note that if the email address is associated with a Bitrise account, the user must be watching the app.
  4. The Enable public page for the App? required input is set to true by default. It creates a long and random URL which can be shared with those who do not have a Bitrise account. If you set this input to false, the Notify: Emails input will be ignored and the Notify: User Roles will receive the build URL instead of the public install URL.
  5. With the Compress the artifacts into one file? required input set to true, you can compress the artifacts found in the Deploy directory into a single file. You can specify a custom name for the zip file with the zip_name option. If you don't specify one, the default Deploy directory name will be used. If the Compress the artifacts into one file? is set to false, the artifacts in the Deploy directory will be deployed separately.
  6. With the Format for the BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP output required input field, you can customize the output format of the public install page’s multiple artifact URLs so that the next Step can render the output (for example, our Send a Slack message Step). Provide a language template description using https://golang.org/pkg/text/template so that the Deploy to Bitrise.io Step can build the required custom output.
  7. With the Format for the BITRISE_PERMANENT_DOWNLOAD_URL_MAP output required input, you can customize the output format of the BITRISE_PERMANENT_DOWNLOAD_URL_MAP so that the next Step can render the output. The next Steps will use this input to generate the related output in the specified format. The output contains multiple permanent URLs for multiple artifacts. Provide a language template description using https://golang.org/pkg/text/template so that the Deploy to Bitrise.io Step can build the required custom output.
  8. The Test API's base URL and the API Token input fields are automatically populated for you.
  9. The html report upload does not have any specific settings because it will happen automatically.

Configuring the Pipeline Intermediate File Sharing section of the Step

The Files to share between Pipeline Workflows input specifies the files meant to be intermediate files shared between the Pipeline Workflows. When uploading the Pipeline intermediate files, you must assign environment variable keys to them in the Files to share between Pipeline Workflows input. The inputs path:env_key values will be saved together with the file and later automatically reconstructed by the Pull Pipeline intermediate files Step. You can use a shorthand of just env_var for $env_var:env_var, when the env_var holds the path to the file(s) you want to share with subsequent Workflows. The directories you specify will be archived and uploaded as a single file.

Configuring the Debug section of the Step

If you wish to use any of the Step’s debug features, set the following inputs:

  1. In the Name of the compressed artifact (without .zip extension) input you can add a custom name for the compressed artifact. If you leave this input empty, the default Deploy directory name is used. Please note that this input only works if you set the Compress the artifacts into one file? input to true.
  2. The Bitrise Build URL and the Bitrise Build API Token inputs are automatically populated.
  3. If The Enable Debug Mode required input is set to true, the Step prints more verbose logs. It is false by default.
  4. If you need a specific bundletool version other than the default value, you can modify the value of the Bundletool version required input. Bundletool generates an APK from an Android App Bundle so that you can test the APK.

Troubleshooting

  • If your users did not get notified via email, check the Enable public page for the App? input. If it is set to false, no email notifications will be sent.
  • If there are no artifacts uploaded on the APPS & ARTIFACTS tab, then check the logs to see if the directory you used in the Deploy directory or file path input contained any artifacts.
  • If the email is not received, we recommend, that you check if the email is associated with Bitrise account and if so, if the account is “watching” the app.

Useful links

Similar steps

Upload apk and mapping.txt to Microsoft AppCenter

This Step is used to search for test results and export them for the Deploy to Bitrise.io Step which can export the results to the Test Reports.

The Step downloads Pipeline intermediate files to a local folder.