So, we're using a staging server to test different branches before going to production.
And upon pipeline success we provide QA engineer possibility to deploy this new branch on staging. Then he might deploy another branch to test it.
What we want to do is revert DB state to what it was at commit from which both branches grow before applying current branch db state.
We use django migrations so it's easy to revert things if we know previously deployed commit/branch name.
So... is it possible to get previous deployment branch/commit while doing new deployment in a pipeline?
To manually see the deployment history in Bitbucket, click the "Deployment"-Tab on the left and then for each deployment there is an info-button on the right side of the heading that contains the Deployment environment name. Clicking that gives you the full history for that environment.
As far as I know, there is no easy automated way to do this. The variable '$BITBUCKET_DEPLOYMENT_ENVIRONMENT_UUID' gives you the uuid of the environment. With that uuid you could use the Bitbucket API to get details about that environment: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/deployments/%7Bdeployment_uuid%7D
Generate an App Password in the BitBucket settings and store it as a secured variable for Auth.
Hi everyone, We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...
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