A few months ago, we rolled out support for Push-To-Deploy with GitHub repositories. Today we are happy to extend Push-To-Deploy’s support to Bitbucket Git repositories. By connecting your App Engine project to your Bitbucket Git repository, you can trigger a deployment of your Java, Python or PHP app by pushing to the project’s master branch on Bitbucket.

Push to Deploy automates your build, test and deploy process triggered by your familiar git commands. It makes delivering code changes to your application easy, safe and fast. Furthermore, managing your release on Google Cloud Platform gives you access to the other exciting devops tools such as Log to Source linking.

"Bitbucket users can now easily deploy their apps to Google App Engine." said Jens Schumacher, Group Product Manager at Atlassian. "With Push-to-Deploy, developers can trigger a deployment by pushing to the repository’s master branch or by merging an approved pull request on Bitbucket."

Let’s walk through an example.

Connecting the repository
  1. Go to the Google Developers Console and create a project or click on an existing project that you wish to sync with Bitbucket.
  2. Click Source Code and then Browse in the left-hand navigation panel.
  3. The next step is to link your project’s repository to Bitbucket.

    If your project does not have git repo or has an empty git repo, you will come directly to the “Source Repository Settings” page. Click “Connect” below the Bitbucket logo.
    If your project has a non empty git repo, you will see a screen listing the content of the current repo. You can change repo setting to connect with a Bitbucket repo (note that this will override the current content of the Project’s repo). Click the Settings icon to get to the “Source Repository Settings” page shown above and then click “Connect” below the Bitbucket logo.
  4. You will be redirected to Bitbucket to authenticate and grant access to your Bitbucket repositories. Click “Grant access”. You may be prompted to log into your Bitbucket account.
  5. Once you have granted access, you will see a list of all Bitbucket Git repositories that you have access to. Choose the repository that you want to connect this project to.
  6. Read and accept the consent option in the dialog box and click Connect.
  7. The Bitbucket repository now appears on the Repo Settings page
  8. You can setup your release pipeline following these instructions
  9. Once your release pipeline is setup, every time you push to your project’s master branch on Bitbucket using git push origin master the source code will be deployed to App Engine. The Release page also shows you the status of the current and past deployments.
-Posted by Rae Wang, Product Manager