Gitpod for Bitbucket 🚀

Jul 2, 2020

Gitpod for Bitbucket 🚀

Avatar of jankeromnes Jan Keromnes

Today, we’re excited to bring you instant developer environments for all Bitbucket projects.

Simply type gitpod.io/# in front of any Bitbucket repository URL, and get a fully prebuilt and ready-to-code dev environment in seconds.

Getting Started with Gitpod for Bitbucket

Starting a fresh dev environment for a Bitbucket project works just as with GitLab and GitHub: Simply prefix your Bitbucket project URL with gitpod.io/#.

For example, you could try opening this Spring PetClinic (Java) repository in Gitpod:

https://gitpod.io/#https://bitbucket.org/gitpod/spring-petclinic

For more convenience, you can also install Gitpod’s browser extension (for Chrome and Firefox), which will add a Gitpod button to all Bitbucket projects or alternatively use our browser bookmarklet.

Gitpod also supports other types of Bitbucket URLs, like:

Depending on the context, your dev environment will be initialized differently.

For instance, if you start a workspace from the issue context above, you’ll get a fresh workspace with a new local branch based on the repository’s default branch (e.g. master).

The new local branch will be named like <username>/<issue-title>-<issue-nr>, in my case it is: svenefftinge/allow-skip-first-name-1 (if the issue title is too long, only the first few words will be included in the branch name).

GitLab Issue Context

Configure your project

To get the most out of Gitpod, you should describe your project’s dev environment with code. Dev environments are based on containers which you can configure through a custom Dockerfile.

Furthermore you can specify which tasks should run after a fresh checkout in a .gitpod.yml file. Usually these tasks include build steps, downloading dependencies and running some unit tests. Read the section below on prebuilds to make Gitpod automatically run these steps ahead of time, as a CI pipeline whenever some changes are pushed to your project.

There is much more you can do to make sure every team member gets a ready-to-code dev environment when they need one. Please refer to the docs for details.

Prebuilds

Gitpod’s prebuilt workspaces are key to providing ephemeral, ready-to-code dev environments for your branches and projects. You can configure Gitpod to run your project’s build asynchronously every time someone pushes new commits or branches to your repository. So when a developer wants to start coding, she can start immediately, because everything is already prepared.

Enabling prebuilds on your Bitbucket project is done by configuring a Webhook. This can be done automatically: Just trigger the first prebuild on your project manually, and Gitpod will take it from there. To do that, use the prefix https://gitpod.io/#prebuild/, as in

https://gitpod.io/#prebuild/https://bitbucket.org/<myuser>/<myrepo>

We Need Your Feedback

If you have ideas how Gitpod can be improved for you, or if you notice a bug, please always feel free to let us know. We would also be glad to welcome you in our community. ❤️

Share this post:

  • Twitter
  • Reddit
  • HackerNews

More articles

DevX Digest 06 - Offload pressure to improve DevX

For our sixth edition of DevX Digest, we’d be breaking down the key highlights of our DevXPod conversation with Shanea from CodeSee.

Avatar of pawlean Avatar of mikenikles Jan 13, 2022

DevX Digest 05 - How DevX has evolved

For our fifth edition of DevX Digest, we’d be breaking down the key highlights of our DevXPod conversation with Jamon from Infinite Red.

Avatar of pawlean Avatar of mikenikles Dec 21, 2021

Gitpod Workspace Networking

Gitpod workspaces are Kubernetes pods. Each Kubernetes pod maintains its own network namespace - similar to how a regular container would. We use a combination of user and network namespaces to enable features you wouldn't find in a normal Kubernetes pod.

Avatar of csweichel Avatar of aledbf Dec 16, 2021