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.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
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