Home

Awesome

pagoPA notifications service

This project implements the APIs to enable user receipts for ecommerce platform.

Architecture overview

Alt text

Setup

Install the dependencies:

$ yarn install

Create a file .env in your cloned repo, with the contents similar to .env.example

Attention must be paid to the mandatory variables for connection to PDV.

Variable nameDescriptiontyperequired
PERSONAL_DATA_VAULT_API_KEYAPI Key for Personal Data Vault (PDV is used to safely encrypt PIIs, in this case it will be used to encrypt the body with sensitive data to write on the queues)stringyes
PERSONAL_DATA_VAULT_API_HOSTAPI base host for Personal Data Vaultstringyes
PERSONAL_DATA_VAULT_API_BASE_PATHAPI base path for Personal Data Vaultstringno
STORAGE_TRANSIENT_CONNECTION_STRINGStorage transient queues connection stringstringyes
STORAGE_DEADLETTER_CONNECTION_STRINGStorage deadletter queues connection stringstringyes

Starting the API runtime

$ yarn start

The server should reload automatically when the code changes.

This microservice use https://github.com/pagopa/aks-microservice-chart-blueprint to release it in k8s.

How to upgrade helm microservice chart release

Follow this steps if you need to upgrade the microservice-chart release.

step 1) update dependencies microservice-chart version

apiVersion: v2
name: microservice-ms
description: microservice-ms
type: application
version: 1.0.0
appVersion: 1.0.0
dependencies:
  - name: microservice-chart
    version: 1.21.0 
    repository: 'https://pagopa.github.io/aks-microservice-chart-blueprint'

step2) update helm dependency to set Chart.lock

helm dependency update helm/

CI

Repo has Github workflow and actions that trigger Azure devops deploy pipeline once a PR is merged on main branch.

In order to properly set version bump parameters for call Azure devops deploy pipelines will be check for the following tags presence during PR analysis:

TagSemantic versioning scopeMeaning
patchApplication versionPatch-bump application version into pom.xml and Chart app version
minorApplication versionMinor-bump application version into pom.xml and Chart app version
majorApplication versionMajor-bump application version into pom.xml and Chart app version
ignore-for-releaseApplication versionIgnore application version bump
chart-patchChart versionPatch-bump Chart version
chart-minorChart versionMinor-bump Chart version
chart-majorChart versionMajor-bump Chart version
skip-releaseAnyThe release will be skipped altogether

For the check to be successfully passed only one of the Application version labels and only ones of the Chart version labels must be contemporary present for a given PR or the skip-release for skipping release step