The ZEIT Now for Bitbucket integration automatically deploys your Bitbucket projects with ZEIT Now, providing Preview Deployment URLs, and automatic Custom Domain updates.

Commits pushed to Bitbucket are automatically built and deployed with Now.

Connecting with Bitbucket

Get started from your dashboard by clicking the "New Project" button followed by "Connect with Bitbucket" from the "Bitbucket" tab under "From your existing code".

ZEIT Now for Bitbucket, ready to connect.

Once you have authorized the Bitbucket integration, you will redirect back to the "New Project" page where you can create a new project from an existing repository by clicking the "New Project from Bitbucket" button under the "Bitbucket" tab or by selecting a template and creating a Bitbucket repo from it.

For more information on deploying projects, read the ZEIT Now introduction documentation.

More Information About ZEIT Now for Bitbucket

For more information, such as a reference for default environment variables, expand the relevant details view below.

Default Behaviour

A Deployment for Each Push

ZEIT Now for Bitbucket will deploy each push by default. This includes pushes and pull requests made to branches. This allows those working within the project to preview the changes made before they are pushed to production.

With each new push, if Now is already building a previous commit, the current build will be canceled to build the most recent commit so that you always have the latest changes deployed as quickly as possible.

Updating the Production Domain

If Custom Domains are set from a project domains dashboard, pushes and merges to the default branch (commonly "master") will be made live to those domains with the latest deployment made with a push.

If you decide to revert a commit that has already been deployed to production, the previous Production Deployment from a commit will automatically be made available at the Custom Domain instantly; providing you with instant rollbacks.

Preview URLs for Each Pull Request

The latest push to any pull request will automatically be made available at a unique preview URL based on the project name, branch, and team or username. These URLs will be given through a comment on each pull request.

A preview URL created from a pull request.

Included Environment Variables

You may want to use different workflows and APIs based on on Git information. To support this, ZEIT Now will deploy your app with the following built-in environment variables when deploying with ZEIT Now for Bitbucket.

hint: These environment variables are available at both Run Time and the Build Step.

Variable Key
An indicator for whether the deployment was made by ZEIT Now for Bitbucket.
The Bitbucket user or team that the project belongs to.
The slug of the Bitbucket repository that was deployed.
The name of the Bitbucket repository that was deployed.
The branch that the deployment was triggered by.
The sha of the commit the deployment was triggered by.
The message accompanying the commit that was deployed.
The name of the commit author.
Bitbucket profile URL of the commit author.