Create builds

Upload build information to enrich releases in your BugSnag dashboard. See Releases & versions for feature information.

For installation instructions for the BugSnag CLI, please see our Installation guide.

Overview

The create-build command wraps the Build API to provide an easy way to send extra data about your releases.

If you run the command from inside the top-level of a Git repository, the first remote URL and commit hash will be used for the source control parameters unless provided by the --provider, --repository or --revision options.

Example Usage

You can create a build using your API key and the version of the release:

$ bugsnag-cli create-build --api-key=YOUR_API_KEY --version-name=1.0.2

Available options

Android AAB (--android-aab)

The path to an Android AAB file from which to obtain build information.

API key (--api-key)

The BugSnag API key for the application.

You can find your API key in Project Settings from your BugSnag dashboard.

App manifest (--app-manifest)

The path to an Android manifest file (AndroidManifest.xml) from which to obtain build information.

Auto assign release (--auto-assign-release)

Whether to automatically associate this build with any new error events and sessions that are received for the release stage.

Build API root URL (--build-api-root-url)

The build server hostname, optionally containing port number.

For use in BugSnag On-premise configurations. The command will append the appropriate path to access the BugSnag API build endpoint.

Default: https://build.bugsnag.com.

Builder name (--builder-name)

The name of the person or entity who built the app.

Default: the current username (whoami).

Bundle version (--bundle-version)

The bundle version of this build of the application (Apple platforms only).

Dry run (--dry-run)

Performs a dry-run of the command without sending any information to BugSnag.

Fail on upload error (--fail-on-upload-error)

Stops the upload when a file fails to upload successfully.

Log level (--log-level)

Sets the level of logging to debug, info, warn or fatal.

Default: info.

Metadata (--metadata)

Custom build information to be associated with the release on the BugSnag dashboard.

For example build configuration parameters, versions of dependencies or the reason for the build. Metadata is specified as a comma-separated list of key-value pairs:

--metadata=key1=value,key2=value2

Port (--port)

The port number for the BugSnag upload server.

Default: 443.

Provider (--provider)

The name of the source control provider that contains the source code for the build.

This is used to help link events on your BugSnag dashboard to source code, for supported source control tools. If the value can be inferred from the repository URL then this option is not required.

Accepted values:

  • github
  • github-enterprise
  • bitbucket
  • bitbucket-server
  • gitlab
  • gitlab-onpremise

Release stage (--release-stage)

The release stage (eg, production, staging) of the application build.

Repository (--repository)

The URL of the repository containing the source code that has been built.

For example, “https://github.com/owner/repo”. This is used to help link events on your BugSnag dashboard to source code, for supported source control tools.

Default: the first remote URL if the command is run from inside a top-level Git repository.

Retries (--retries)

The number of retry attempts before failing the command.

Default: 0.

Revision (--revision)

The source control SHA-1 hash for the code that has been built (short or long hash).

This is used to help link events on your BugSnag dashboard to source code, for supported source control tools.

Default: the current revision if the command is run from inside a top-level Git repository.

Timeout (--timeout)

The number of seconds to wait before failing the command.

Default: 300.

Verbose (--verbose)

Sets the level of the logging to its highest.

This is the equivalent of setting the log level to debug.

Version code (--version-code)

The version code of this build of the application (Android only).

Version name (--version-name)

The version of the application.