Deployment

How build and deployment works in Frontastic.

Build software

Pushing to the master branch will automatically trigger a build (if there's currently no build running). If you want a different branch built than master, you need to push a (probably empty) commit with the message #build to that branch to trigger Continuous Integration to build it.

Once the build goes through and is successful, you'll receive a commit with the built assets plus a tag in the form YYYY.MM.DD.HH.II, which is your release tag.

Test the build

master builds will be automatically deployed to your staging environment when successful. If you want to deploy a non-master build, you can trigger the deployment to staging in the same way as deploying to production, which is explained in the next step.

Once deployed, you can perform acceptance tests in staging and eventually roll out the new version. The master build for frontend gets deployed automatically to your staging site on Netlify. You can use the staging site to test changes before publishing them to production.

Rollout

Once you're satisfied with the state of the built assets, you can deploy using the steps below:

  1. Open your Frontastic studio, click Developer, then Deployment, or use the URL similar to https://<your-project>.frontastic.io/developer/deployment

  1. Click Deploy new version

  2. Select the tag you created in the list and it will deploy

❗️

Before deploying a new project for the first time, a provision needs to be made for the project. Please contact our Support team, who'll do this for you.

If it's not in the dropdown list, you can follow the steps below to deploy it anyway.

At the bottom of the page within the studio, you'll find an example cURL command with your current session ID, similar to the below:

curl \
    -X POST \
    --cookie 'FCSESSID0815=c95914cb7a3ef945f56cd0053ab01234' \
    --header 'Content-Type: application/json' \
    -d '{"tag": "####.##.##.##.##"}' \
    'https://<your-project>.frontastic.io/api/deployment/schedule?environment=$env'

Copy this command into your shell and replace ####.##.##.##.## with the concrete tag that was created by the CI $env with staging or production, depending on the environment you want to deploy to.

If you already have a Frontastic API-Token, you can also use the token-based approach instead of your current Frontastic studio session:

curl \     
    -X POST \    
    --header 'X-Frontastic-Api-Token: <your-api-token>' \     
    --header 'Content-Type: application/json' \     
    -d '{"tag": "####.##.##.##.##"}' \     
    'https://<your-project>.frontastic.io/api/deployment/schedule?environment=env'

It'll then deploy.

The auto-publishing feature is turned off on your production site. Hence, you'll have to manually deploy a build to production.

To deploy a build to production, open the Deploys page of your Netlify site. Then click on the build you want to deploy to production in the list of deploys.

You can use the staging site to test latest master build. Once tested, use the commit id to find the unique deployment for a build and click on Publish deploy button to publish this build to production.

Getting the current deployment status

At the moment, status information is very limited, and there's a timeframe of around 5 minutes of silence where we spin off new sandboxes. But you can access the status for the deployment with the following command:

curl \
    --header 'X-Frontastic-Api-Token: <your-api-token>' \
'https://<your-project>.frontastic.io/api/deployment/status?environment=env'

We're working on adding more status information to this service endpoint.

Visit the Builds page on your Netlify team dashboard to see the status of all frontend builds, as shown below.

Read Monitor builds in Netlify documentation to learn more.

Rollback

If you're experiencing any issues with your latest deployment, you can roll back to the previous build. Click the Rollback to button to do this.

To roll back the frontend application to an older build follow the instructions below:

Logs

By clicking the View deployment log button, you can see the logs from the current build version.

You can check the frontend application deployment logs on Netlify. Learn more about deployment logs on Netlify documentation.

Current version

The information near the top of the screen is where you can find the current version that's deployed.

For example:

You'll find the latest deployed version details of the frontend application on the Netlify site's dashboard.


Did this page help you?