I've been working on a manual process for development, testing, and deployment tailored to our business and business needs - and we've settled on a system that works really well for us, and I'm think that BitBucket can help us automate some of the ugly parts, I just can't figure out how.
We use a very simple git workflow:
master: Anything in the "master" branch is, for all intents and purposes, considered "deployed to production". We've configured BitBucket so that code can only enter the master branch via pull request. At the moment, after merging into master I will manually log into the production server to run "git pull && npm install && gulp", although we're looking at BitBucket Pipelines to help automate that.
TICKET-XX: All "feature" branches are named after a ticket in Jira. With the exception of epics, all features are branched off of master. For an epic we create an "epic" branch off of master, then features branch off of the epic branch. Similarly non-epic ticket pull requests are targeted at master, and epic ticket pull requests are targeted at the epic branch (until the epic is ready to release, at which point the epic branch has a PR created targeting master)
Rather than have a single "test" or "staging" environment, we have one test environment per tester. This way two different people can test two different features at the same time. When someone is ready to test, they:
If the feature is approved, we can safely merge the ticket into master and deploy with zero fear because we literally just merged master into the feature branch -- so if there were any conflicts or issues they would have been detected at that stage.
The problem is that I'm having trouble finding a good way to automate this process with BitBucket.
For step 1 (merging master into TICKET-XX), this can be done at literally any time, and as frequently as we want. This doesn't necessarily have to happen just before testing, but could be done whenever any code is pushed to BitBucket. If there's a merge conflict, we'd rather know about it sooner rather than later. This sounds fairly easy to automate (whenever someone pushes to BitBucket, run "git merge master") but I don't know how to do it.
For steps 2 and 3, I don't know of a way to automate this process. Ideally a tester could look at an open pull request and click a "Test this PR" button, then have it run all necessary steps and link them to the running app. Of course which environment it deployed to would depend on which tester clicked the button. I don't know if BitBucket can do this, but this is the crux of my question.
We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events