How To Deploy A Branch With Frontastic

While this is not built into the deployment app in bachstage and our continuous integration system you cann still deploy a certain branch on staging and production. this can be especially useful if you want to apply a small fix to the version currently deployed on production system.

Prepare A New Build

To deploy a branch with JavaScript or CSS changes you must build a release yourself. We provide you with a handy command for this, which does everything:

ant package

This command must be executed inside the virtual machine or docker container. It will create a GIT changeset with freshly built assets (if there are JavaScript or CSS changes). This change set can be comitted like:

git commit -m `Built assets for release`

Push A Tag

The most important thing is that you must create a GIT tag if you want to deploy anything. If you only have changes in the PHP stack you can even skip the step of preparing a build. The deployable tags must have the following format: /^\d{4}\.\d{2}\.\d{2}\.\d{2}\.\d{2}$/, so for example 1981.04.15.08.16. We are generally use the current date for the release tags. Thus you can create and publish a tag for the current HEAD using:

git tag `date '+%Y.%m.%d.%H.%M'`
git push --tags

Then you can use the deploy curl command you find in the deployment app in Backstage to deploy this tag to the staging or production system. This tag will not be listed in the drop downs, so you have to use the curl command or the slack bot if it is active for you.