Releases
Backend Services
Before starting a release, please open a Back-End Release issue and append it to the Development Board with the appropriate Sprint/Iteration. Update the release issue as you make progress through the release.
Step 1: GitHub Release
- The first step is to tag the branch (
main) from which the image will be built. - The tag can be created as part of the GitHub Release UI

- When you create a tag in the format
v*(for example,v7.1.2), a GitHub workflow will trigger to build and push an image to AWS ECR. - Select the branch that the tag will be attached to and add a release title
- Please always click on the
Generate release notesbuttons to have GitHub create the release notes based on the commit messages added between the last release and this one - Then click
Publish releaseto start the workflow that will build out the image and push it to AWS ECR

Step 2: Create Snapshot Backups
- Before deploying new releases to the production environment, you should create snapshots of the databases in case the release requires a rollback.
- To do this on the AWS console, go to the RDS service and click on DB Instances under Resources.
- There are currently three instances to create snapshots for: customers, services, and postgres.
- Create a snapshot for each of them by selecting the database and selecting Take snapshot.


- Create the snapshots with names in the format
<db-name>-<current-date>-<current-time>(e.g.,esp-customer-8-25-12-25-1453). - Wait for the snapshots to be created and then move onto the next section.
Step 3: Create Task Definition & Deploy
- The next step is to create the task definition for the service you are going to release.
- A task definition is how AWS defines the blueprint to build your application in ECS
- Usually, this just means updating the image URI used in the task definition.
- First, go to Elastic Container Registry (ECR). Here you should see the image you created in Step 1 at the top of the list.

- Select the image and then click Copy URI. This will be pasted in when we update the task definition.
- Next, go to Elastic Container Service (ECS) and click on Task definitions in the left-hand tab.
- You will see a list of all task definitions; we have task definitions for each tenant and for each central service.
- This means if you want to perform a rollout for the customer tenants, you need to update the task definition for each individual tenant.
Important : Steps 5 to 12 have to be repeated for each customer tenant that you want to update
- Click on the service you wish to update.
- From here, click Create new revision, and then select Create new revision again.

- In most cases, we are only going to be updating the Image URI that we copied before. Paste the Image URI here, scroll down to the bottom of the page, and click Create.

- From here, go back to the Elastic Container Service and click on the service for the task definition that you have just updated.
- Then click on Update Service.

- Click on the Revision dropdown and select the task definition revision you just created. This will be marked with 'Latest'.

- Scroll down to the bottom and click Update. This will trigger the new deployment.
- You can monitor the deployment's progress from the previous page. From there, you can check the logs and see if the container deploys successfully.

Frontend Applications
This section will cover the process of releasing a new version of a frontend application.
- Platform APP - *.own.esprofiler.com
- Vendor Portal - vendor.capability.exchange
- Account Portal - my.esprofiler.com
Before starting a release, please open a Front-End Release issue and append it to the Development Board with the appropriate Sprint/Iteration. Update the release issue as you make progress through the release.
Step 1: Production Build
- Ensure all code intended for production release is merged into the
mainbranch. - Navigate to the repository, and while on the
codetab, clicktagsfound to the right of the branch selector. - Click the releases button, then click
Draft a new releasebutton. - Click on
Select tagdropdown and at the bottom of the list, clickCreate new tag, in the prompt enter the version number,vX.X.Xand clickcreate. - For the
Tagetfield, themainbranch should be selected by default. - Enter a release title
Release vX.X.X - (Optional) Under
Release Notesselect the previously released version tag that comes immediately before this new tag if you don't trust the defaultAutooption (I don't). - Click
Generate Release Notes-- this will populate the Release Notes field with the commit messages since the last release. - Scroll down to the bottom of the page and click
Publish Release, this will trigger the Publish Tag workflow where it should be visibily running inActions. - Once the workflow completes, this will have created a new tag and pushed the build application to AWS Bucket in a folder reflecting the version number.
- Inform the backend team that the new version is ready for Production Tenant Rollout.
Step 2: Tenant Rollout
Currently the backend configures the frontend that the user will see for a given tenant
In order to update the version of the frontend the tenant is using we have to update the SPA property in the SPAProperties class in the platform-api repo.

In this case the frontend version is 3.9.7 to update it to, for example 3.10.0 we would replace the targetString value from v3-9-7 to v3-10-0
The backend release process then has to be followed for the change to take effect. Please see Backend Release.
Staging: Release Candidate
Upon merge of a pull request to main, a release candidate will be automatically built and deployed to staging.own.esprofiler.com.
Staging: Review Apps (TBC)
- When to use
- How to use
Frontend Websites
TBC

