Link your Bitbucket account with your personal account or team on ZEIT Now from your dashboard by clicking "Import Project" followed by "From Git Repository". Then, click the "Bitbucket" tab and click "Connect with Bitbucket".
Once you have authorized the Bitbucket integration, you will be redirected back to the "Import Git Repository" page where you can import a project from an existing repository by clicking the "Import Project from Bitbucket" button under the "Bitbucket" tab.
For more information on deploying projects, read the ZEIT Now introduction documentation.
If you’d like to:
- Change the Bitbucket repository your project is connected to
- Disconnect your project from your Bitbucket repository
For more information, such as a reference for default environment variables, expand the relevant details view below.
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.
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.
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.
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.
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.
Disconnect from Bitbucket
To disconnect your personal account or team on ZEIT Now from Bitbucket, take the following steps:
First, log into Bitbucket, click on your profile icon on the bottom left, and select Bitbucket settings.
Next, from Access Management, select OAuth.
Finally, from OAuth integrated applications, locate ZEIT Now and click the Revoke link next to it.
After disconnecting, you can always reconnect your ZEIT Now account to a Bitbucket account again.