Salesforce and Bitbucket
Atlassian is one of our favorite companies. They build a wide variety of great developer tools, they have thoughtful values and they are a true unicorn in that they IPO’d via bootstrapping their business solely on customer revenue.
They’ve created a brilliantly complimentary suite of products that covers the entire software development lifecycle. Many of us at Blue Canvas have used their products throughout our careers. We’ve used Confluence to come up with ideas and collaborate on solutions. We’ve used JIRA and Trello to make plans and prioritize work. And we’ve used Bamboo and Bitbucket to actually get code released. Atlassian’s toolbelt rivals many of the enterprise platforms like Microsoft in its completeness, but surpasses all of them in its design aesthetic and simplicity.
Atlassian and Salesforce
But on top of all of that, Atlassian has a very cool Salesforce development strategy.
Many of our customers are using Atlassian products across their stack to make their Salesforce teams more agile. Most often we hear about JIRA and Bitbucket. We’ve written before about how to leverage Salesforce and JIRA with Blue Canvas.
As a source control tool, we at Blue Canvas wanted to provide some more information on how you can integrate Blue Canvas with Bitbucket to make development a bit simpler for the specific Salesforce use case.
Challenges with Salesforce and Git
Due to the popularity of our blog post on how Atlassian does Salesforce development, we’re often asked how other companies can do this themselves without investing as heavily in a team to do it.
Whether you have Atlassian’s development resources or not, the problem always starts with the difficulty of getting declarative Salesforce metadata into Git. This happens for a few reason. First of all, getting Admins into a Git flow can bring its own challenges. Sometimes they are not comfortable with the command line. And even when they can use tools like SourceTree they find themselves too busy to really adopt a proper Git flow for Salesforce. It’s too tempting to just click save when you’re adding a field or making a quick change in the Salesforce UI.
Furthermore, the Salesforce SOAP APIs and Ant migration tool really don’t do any favors for making this easier.
Using Blue Canvas to Get Changes into Git
Blue Canvas can help you get your Salesforce declarative metadata into Bitbucket. Under the hood, Blue Canvas is a standard Git repository. This makes it simple and intuitive to push from our repo into external repositories.
Since Blue Canvas automatically syncs admin changes into Git on save, we’re effectively a nice piece of middleware that can get your Salesforce admin metadata into GIt. If you have a Blue Canvas Git repository this is happening automatically and in real time.
Once you’ve connected your Salesforce orgs to Blue Canvas, the next step is simple: just configure Bitbucket as an external remote and push to it. As you can see our UI provides instructions for pulling code down locally into a Git repo. You can then simply push to a branch in your Bitbucket repository. It’s that easy.
The next step of course is automating this. Adding this kind of automatic push is on our roadmap. In the meantime, you can schedule a job with Jenkins, Bitbucket Pipelines or Bamboo. Or you can set up a cron job.