Skip to content

Commit

Permalink
feat: Release V2.1.0 (#276)
Browse files Browse the repository at this point in the history
* feat: add token middleware and env toggle

* refactor: optional chaining

* docs: typo

* chore(deps): bump find-my-way from 8.2.0 to 8.2.2

Bumps [find-my-way](https://github.com/delvedor/find-my-way) from 8.2.0 to 8.2.2.
- [Release notes](https://github.com/delvedor/find-my-way/releases)
- [Commits](delvedor/find-my-way@v8.2.0...v8.2.2)

---
updated-dependencies:
- dependency-name: find-my-way
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* refactor: migrate from frms to tazama-lf (#245)

* refactor: migrate from frms to tazama-lf

* feat: Env/validation (#247)

* feat: add env validation

* test: mock envs

* fix: update auth flag from service auth to node env

* refactor: use same values for templating

* refactor: apply cache option environment variable split

* refactor: encapsulate environment variables

* refactor: change directory path

* test: mock the services of the library

* refactor: bump tazama libraries

* refactor: bump lib version

* refactor: add auth requirement for production

* feat: add multi-currency dataCache (#261)

* feat(deps): use latest datacache from frms-coe-lib

* feat: add xchgRate and use multi currency datacache

* refactor(rename): use better naming for pending promises array

* test: update datacache tests

* docs: update message samples and activity diagram

* feat: updated old links

* refactor: bump frms-coe-lib

* refactor: use lib schema save methods

* refactor: remove collection based environment variables

* test: update unit test mocks

* docs: replace Redis with Valkey

* feat: updated XchgRate object for Pain001

* bug: fixed spelling

* build: update libs (#275)

Co-authored-by: rtkay123 <[email protected]>

* ci: sync workflows from central-workflows (#201)

* ci: sync workflows from central-workflows Signed-off-by: Kyle Vorster <[email protected]>

* ci: sync workflows from central-workflows Signed-off-by: Scott <[email protected]>

* ci: sync workflows from central-workflows Signed-off-by: Scott <[email protected]>

* ci: sync workflows from central-workflows Signed-off-by: Scott <[email protected]>

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Scott <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Len Bekker <[email protected]>
Co-authored-by: Len Bekker <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cebolenkosi Shezi <[email protected]>
Co-authored-by: cshezi <[email protected]>
Co-authored-by: Justus Ortlepp <[email protected]>
Co-authored-by: Jean-Pierre <[email protected]>
Co-authored-by: Jean-Pierre Nell <[email protected]>
Co-authored-by: rtkay123 <[email protected]>
Co-authored-by: rtkay123 <[email protected]>
Co-authored-by: Kyle Vorster <[email protected]>
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
13 people authored Dec 3, 2024
1 parent a49dbb1 commit 06dba4b
Show file tree
Hide file tree
Showing 33 changed files with 2,082 additions and 1,043 deletions.
36 changes: 21 additions & 15 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,48 +1,54 @@
# SPDX-License-Identifier: Apache-2.0
FUNCTION_NAME=transaction-monitoring-service
NODE_ENV=dev
MAX_CPU=
MAX_CPU=1

# Nats
# NATS
SERVER_URL=0.0.0.0:4222
PRODUCER_STREAM=event-director
STARTUP_TYPE=nats

# Fastify
# FASTIFY
PORT=3000

# MISC
CACHE_TTL=0 # Used for Data cache object and redis cache.
CACHETTL=0 # Used for Data cache object and redis cache.
QUOTING='false'

# AUTH
CERT_PATH_PUBLIC=
AUTHENTICATED=false

# REDIS
REDIS_DB=0
REDIS_DATABASE=0
REDIS_AUTH="exampleAuth"
REDIS_SERVERS='[{"host":"127.0.0.1", "port":6379}, {"host":"127.0.0.1", "port":6380}]'
REDIS_IS_CLUSTER=false
DISTRIBUTED_CACHETTL=300
DISTRIBUTED_CACHE_ENABLED=true

# ArangoDB
PSEUDONYMS_DATABASE=pseudonyms
# NODE CACHE
LOCAL_CACHETTL=300
LOCAL_CACHE_ENABLED=true

# ARANGO DB
TRANSACTION_HISTORY_DATABASE=transactionHistory
TRANSACTION_HISTORY_DATABASE_URL=tcp://0.0.0.0:8529
TRANSACTION_HISTORY_DATABASE_USER=root
TRANSACTION_HISTORY_DATABASE_PASSWORD=''
TRANSACTION_HISTORY_DATABASE_CERT_PATH=
TRANSACTION_HISTORY_PAIN001_COLLECTION=transactionHistoryPain001
TRANSACTION_HISTORY_PAIN013_COLLECTION=transactionHistoryPain013
TRANSACTION_HISTORY_PACS008_COLLECTION=transactionHistoryPacs008
TRANSACTION_HISTORY_PACS002_COLLECTION=transactionHistoryPacs002

PSEUDONYMS_DATABASE_URL=
PSEUDONYMS_DATABASE=pseudonyms
PSEUDONYMS_DATABASE_URL=tcp://0.0.0.0:8529
PSEUDONYMS_DATABASE_USER=root
PSEUDONYMS_DATABASE_PASSWORD=
PSEUDONYMS_DATABASE_PASSWORD=''
PSEUDONYMS_DATABASE_CERT_PATH=

# ELASTIC APM
APM_ACTIVE=true
APM_ACTIVE=false
APM_SERVICE_NAME=transaction-monitoring-service
APM_URL=http://apm:8200
APM_SECRET_TOKEN=""
APM_SECRET_TOKEN=''

# LOGGING
LOGSTASH_HOST=logstashhost
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

name: Benchmark CI
env:
GITHUB_TOKEN: ${{ secrets.GH_WRITE_TOKEN }}
Expand Down Expand Up @@ -34,8 +36,8 @@ jobs:
cat "${{ env.PROCCESSOR_REPO_NAME }}".csv.tmp >> "${{ env.PROCCESSOR_REPO_NAME }}".csv
git reset "${{ env.PROCCESSOR_REPO_NAME }}".csv.tmp
git add "${{ env.PROCCESSOR_REPO_NAME }}".csv
git commit -m "#${{ github.event.number}} Pushed update of ${{ env.PROCCESSOR_REPO_NAME }}"
git commit -m "#${{ github.event.number }} Pushed update of ${{ env.PROCCESSOR_REPO_NAME }}"
- name: push data
run: |
cd ${{ env.REPO_NAME }}
git push origin main
git push origin main
13 changes: 9 additions & 4 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
Expand All @@ -11,14 +13,16 @@
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.

# Please do not attempt to edit this flow without the direct consent from the DevOps team. This file is managed centrally.

name: Codacy Security Scan

on:
push:
branches: [ "main" ]
branches: [ "dev", "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: [ "dev", "main" ]
schedule:
- cron: '17 0 * * 4'

Expand All @@ -27,6 +31,7 @@ permissions:

jobs:
codacy-security-scan:
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
Expand All @@ -40,7 +45,7 @@ jobs:

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
uses: codacy/codacy-analysis-cli-action@3ff8e64eb4b714c4bee91b7b4eea31c6fc2c4f93
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
Expand All @@ -56,6 +61,6 @@ jobs:

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
16 changes: 11 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
Expand All @@ -9,19 +11,23 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#

# Please do not attempt to edit this flow without the direct consent from the DevOps team. This file is managed centrally.

name: "CodeQL"

on:
push:
branches: [ "main" ]
branches: [ "dev", "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: [ "dev", "main" ]
schedule:
- cron: '34 0 * * 4'

jobs:
analyze:
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
Expand All @@ -44,7 +50,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -58,7 +64,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -71,6 +77,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
3 changes: 3 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

# This GitHub Actions workflow validates the title of pull requests (PRs) to ensure they follow conventional commit standards.

# Please do not attempt to edit this flow without the direct consent from the DevOps team. This file is managed centrally.

name: PR Conventional Commit Validation

on:
Expand All @@ -16,6 +18,7 @@ on:

jobs:
validate-pr-title:
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
runs-on: ubuntu-latest # Use the latest Ubuntu runner for the job
steps:
- name: Checkout code
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/dco-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: Apache-2.0

# This GitHub Actions workflow checks that all commits in a pull request (PR) have a "Signed-off-by" line to ensure Developer Certificate of Origin (DCO) compliance.

# Please do not attempt to edit this flow without the direct consent from the DevOps team. This file is managed centrally.

name: DCO

# Trigger the workflow on pull request events
on: [pull_request]

jobs:
dco:
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
# Define the runner environment
runs-on: ubuntu-latest

steps:
# Step to check out the repository
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches to ensure complete commit history is available

- name: Set up environment variables
run: |
echo "BASE_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
echo "HEAD_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
# Step to check each commit in the pull request for a Signed-off-by line
- name: Check for DCO Sign-off
run: |
# Get the base branch and head branch of the pull request
base_branch=$BASE_BRANCH
head_branch=$HEAD_BRANCH
# Get the list of commit hashes between the head branch and base branch
commits=$(git log --pretty=format:%H origin/${head_branch}..origin/${base_branch})
non_compliant_commits=""
# Loop through each commit and check for the Signed-off-by line
for commit in $commits; do
# Check if the commit message contains the Signed-off-by line
if ! git show --quiet --format=%B $commit | grep -q "^Signed-off-by: "; then
# If not, add the commit hash to the list of non-compliant commits
non_compliant_commits="$non_compliant_commits $commit"
fi
done
# If there are any non-compliant commits, output their hashes and fail the job
if [ -n "$non_compliant_commits" ]; then
echo "The following commits do not have a Signed-off-by line:"
for commit in $non_compliant_commits; do
echo "- $commit"
done
exit 1
fi
shell: bash
8 changes: 7 additions & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# SPDX-License-Identifier: Apache-2.0

# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement


# Please do not attempt to edit this flow without the direct consent from the DevOps team. This file is managed centrally.

name: 'Dependency Review'
on: [pull_request]

Expand All @@ -17,4 +23,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
52 changes: 52 additions & 0 deletions .github/workflows/dockerfile-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# SPDX-License-Identifier: Apache-2.0

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# hadoint is a Dockerfile linter written in Haskell
# that helps you build best practice Docker images.
# More details at https://github.com/hadolint/hadolint

# Please do not attempt to edit this flow without the direct consent from the DevOps team. This file is managed centrally.

name: Hadolint

on:
push:
branches: [ "dev", "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "dev" ]
schedule:
- cron: '17 13 * * 0'

permissions:
contents: read

jobs:
hadolint:
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
name: Run hadolint scanning
runs-on: ubuntu-latest
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run hadolint
uses: hadolint/hadolint-action@f988afea3da57ee48710a9795b6bb677cc901183
with:
dockerfile: ./Dockerfile
format: sarif
output-file: hadolint-results.sarif
no-fail: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: hadolint-results.sarif
wait-for-processing: true
Loading

0 comments on commit 06dba4b

Please sign in to comment.