This will only affect backend deployment.
Frontastic's Continuous Integration (CI) works on the basis of trunk-based development which means that the
master branch in GitHub always holds the version that will go into production next. So, the CI server only performs a full production build when you push to
master and automatically deploys this to your staging environment.
There might be cases where you can't simply deploy the latest
master build to production. For example, you're currently testing a big new feature that isn't ready to go live yet, but you need to deploy an urgent fix to production. To do this, follow the steps below.
- Find out which version is currently deployed to your backend production system (open the Frontastic studio, click Developer, then Deployment)
In this example, it's version
2022.03.02.18.26. Every such version corresponds to a certain commit and tag in your GitHub repository. So, you can easily use it as a starting point for a branch for your fix.
- Create a branch for your fix from the backend production version:
git checkout -b fix/something-urgent 2022.03.02.18.26
This creates a branch named
fix/something-urgent that starts precisely at the point deployed in production.
- Apply your fix, test it properly, and push the branch to the remote repository using:
git push -u origin fix/something-urgent
This will cause the CI server to perform centralized tests on this branch.
This won't build production-ready assets yet. To do this, you'll need to explicitly instruct the CI server by pushing a commit that includes
#build(see the Continuous Integration article for more information.
- Push a commit including
git commit -m 'ci: #build' --allow-empty ; git push
This command creates an empty commit with just the corresponding message in your branch and pushes it to the remote.
Once the CI server has finished the build successfully, you'll find a new tag in your branch that you can use to trigger a deployment.
Deploy your new tag to staging from the Development section in the Frontastic studioFrontastic studio - The interface you use to manage, build, and edit all areas of your project and commerce sites. Previously known as `backstage`. (see the rollout section of the deployment article for the steps to do this)
Test the fix in staging
Roll back to the previous staging version
Roll out your fix to production from the Frontastic studioFrontastic studio - The interface you use to manage, build, and edit all areas of your project and commerce sites. Previously known as `backstage`.
Merge your fix into
masterso it's not lost when you deploy again
Updated 25 days ago