Skip to content

Commit

Permalink
Feature/dev tomaster (#36)
Browse files Browse the repository at this point in the history
* Readme file added (#1)

* Create README.md

Added new readme.md file

* Update README.md

* Removed unnecessary dependencies from pom.xml (#2)

* Removed unnecessary dependencies from pom.xml, added crypto.utils to resolve build issues

* pom.xml cleanup

* updated code-of-conduct, copying, contributing, readme (#3)

* Create CONTRIBUTING.md

* Create CODE_OF_CONDUCT.md

* Create COPYING

* Update README.md

* modified .gitignore file (#4)

* modified .gitignore file

* Delete target directory

* Update .gitignore

* Delete logs directory

* code smell fixes (#6)

* Added copyright text (#7)

Co-authored-by: Anjana K J <[email protected]>

* code smell fix (#8)

* code smell fix

* code smell fixes

* Sonarqube reported code smell fix

* done correction for application.properties

* Swagger changes (#9)

* Swagger changes

* Swagger changes

* Code smell fix (#10)

* code smell fixes (#11)

* Create sast-and-package-prod.yml (#12)

* Create sast-and-package-prod.yml

* Update sast-and-package-prod.yml

* Code smell changes (#13)

* Update README.md

* code smell fixes

* Added environment variable

* Added password changes & edit environment variable (#16)

* Added environment variable

* Added password changes

* Passing environment variable

* Passing environment variable (#17)

* Passing environment variable

* Passing environment variable (#19)

* Passing environment variable (#20)

* Passing environment variable

* Passing environment variable

* Workflow change (#21)

* Update sast-and-package-prod.yml

* Update sast-and-package.yml

* CreatedDate filed for Identity (#22)

* CreatedDate filed for Identity

* removed uncommented code

* Send SMS null Id issue (#23)

* CreatedDate filed for Identity

* removed uncommented code

* deleting DB config

* Send SMS Null ID Issue

* mmu cr changes

* update changes

* changes mmu cr

* Update sast-and-package-prod.yml (#26)

* edit api changes

* Identity API cleanup and password masking

* Updated the language option for codeql and added maven test

* Added CodeQl tool to do static code analysis on pull request

* Implementing Basic reverse sync operation

* Fix issue on controller

* Updated the language option for codeql and added maven test

* Added CodeQl tool to do static code analysis on pull request

* Implementing Basic reverse sync operation

* Fix issue on controller

* Identity API cleanup and password masking

* edit api changes

* change made in description of identity controller (#30)

* Multiple beneficiaries sync issue changes for FLW (#31)

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

* Delete .github/workflows/sast-and-package-prod.yml

* Delete .github/workflows/sast-and-package.yml

* Create package-prod.yml

* Create package.yml

* Create sast.yml

* Use a logger to log this exception (#32)

* Added Pull Request template, added placeholders in properties file, and added admin_local to git ignore (#33)

---------

Co-authored-by: Mahima Elizabeth George <[email protected]>
Co-authored-by: Sweta Prakash <[email protected]>
Co-authored-by: Vidyadevi Salunkhe <[email protected]>
Co-authored-by: Anjana2310 <[email protected]>
Co-authored-by: Anjana K J <[email protected]>
Co-authored-by: Harimohan Rajamohanan <[email protected]>
Co-authored-by: swetatech24 <[email protected]>
Co-authored-by: Anjana <[email protected]>
Co-authored-by: mukul5947 <[email protected]>
Co-authored-by: Indrani Bandyopadhyay <[email protected]>
Co-authored-by: devikasuresh20 <[email protected]>
Co-authored-by: indraniBan <[email protected]>
Co-authored-by: Sunil GV <[email protected]>
Co-authored-by: roopesh-beehyv <[email protected]>
Co-authored-by: helenKaryamsetty <[email protected]>
Co-authored-by: Babacar Ndiaye <[email protected]>
Co-authored-by: Devika <[email protected]>
  • Loading branch information
18 people authored Oct 13, 2023
1 parent 817f37c commit fc53d1f
Show file tree
Hide file tree
Showing 160 changed files with 3,713 additions and 2,005 deletions.
30 changes: 30 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

# Type of change

- [ ] Bug fix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Documentation
- [ ] Other ( please specify )

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

- [ ] Test A
- [ ] Test B

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] Any dependent changes have been merged and published in downstream modules


43 changes: 27 additions & 16 deletions .github/workflows/build-on-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
name: Build On Pull Request
name: Build and Static Code Analysis On Pull Request
on:
pull_request:
branches: [ "master","develop" ]

branches: [ "develop" ]
jobs:
Build:
Build_and_analyse:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Setup JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'
- name: Build with Maven
run: mvn clean install
- name: Setup JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'

- name: Test with Maven
run: mvn test

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: Java

- name: Build with Maven
run: mvn clean install

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
41 changes: 41 additions & 0 deletions .github/workflows/package-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Package-prod

on:
push:
branches: [ "master"]
paths-ignore:
- target/**

pull_request:
branches: [ "master" ]
paths-ignore:
- target/**

env:
ENV_VAR: prod

jobs:
Package-prod:
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v3

- name: Setup JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'

- name: Build with Maven
run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }}

- name: Create WAR file
run: mvn -B package --file pom.xml

- name: Upload WAR file as artifact
uses: actions/upload-artifact@v2
with:
name: Identity-API
path: target/identity-0.0.1.war
50 changes: 50 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

name: Package

on:
push:
branches: [ "develop"]
paths-ignore:
- target/**

pull_request:
branches: [ "develop" ]
paths-ignore:
- target/**

env:
ENV_VAR: test

jobs:
Package-test:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Setup JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'


- name: Build with Maven
run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }}

- name: Build WAR file
run: mvn -B package --file pom.xml

- name: Upload WAR file as artifact
uses: actions/upload-artifact@v2
with:
name: Identity-API
path: target/identity-0.0.1.war
49 changes: 23 additions & 26 deletions .github/workflows/sast-and-package.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
name: Static Code Analysis and Packaging
name: Package

on:
push:
branches: [ "master","develop" ]

branches: [ "develop"]
paths-ignore:
- target/**

pull_request:
branches: [ "develop" ]
paths-ignore:
- target/**

env:
ENV_VAR: test

jobs:
CodeQL:
Package-test:
runs-on: ubuntu-latest
permissions:
actions: read
Expand All @@ -14,37 +25,23 @@ jobs:
strategy:
fail-fast: false
steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Setup JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: Java


- name: Build with Maven
run: mvn clean install
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
languages: Java

Packaging:
needs: codeql
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'
- name: Create WAR file
run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }}

- name: Build WAR file
run: mvn -B package --file pom.xml

- name: Upload WAR file as artifact
uses: actions/upload-artifact@v2
with:
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/sast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CodeQL

on:
push:
branches: [ "develop" ]
paths-ignore:
- target/**

pull_request:
branches: [ "develop" ]
paths-ignore:
- target/**

jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2

- name: Setup JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'

- name: Build with Maven
run: mvn clean install

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ nbdist/
mvnw
mvnw.cmd
.mvn

# Properties
src/main/environment/1097_local.properties
src/main/environment/common_local.properties
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# AMRIT - Identity Service
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ![branch parameter](https://github.com/PSMRI/Identity-API/actions/workflows/sast-and-package.yml/badge.svg)

Identity API is a microservice which is used for the creation and management of beneficaries.

Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
<org.mapstruct.version>1.2.0.Final</org.mapstruct.version>
<org.projectlombok.version>1.16.18</org.projectlombok.version>
<environment>dev</environment>
<environment>${ENV_VAR}</environment>
<target-properties>target/classes/application.properties</target-properties>
<source-properties>src/main/environment/common_${environment}.properties</source-properties>
<maven.test.skip>true</maven.test.skip>
<sonar.java.binaries>target</sonar.java.binaries>
</properties>
<dependencies>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions src/main/environment/1097_dev.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# DataSource settings: set here your own configurations for the database

spring.datasource.url=jdbc:mysql://10.208.122.32:3306/db_1097_identity?autoReconnect=true&useSSL=false
encDbUserName=0YaEPoKpzM3TrEAHTLYQaf+DfR4mdaeP
encDbPass=V+g/nL6/+ely0bgD7Du0yX83xNRl1H9Y
spring.datasource.url=<Enter AMRIT DB_1097_IDENTITY URL here>
spring.datasource.username=<Enter your AMRIT DB_1097_IDENTITY username>
spring.datasource.password=<Enter your AMRIT DB_1097_IDENTITY password>
spring.datasource.driver-class-name=com.mysql.jdbc.Driver


6 changes: 3 additions & 3 deletions src/main/environment/1097_local.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# DataSource settings: set here your own configurations for the database

spring.datasource.url=jdbc:mysql://localhost:3306/db_1097_identity?autoReconnect=true&useSSL=false
encDbUserName=DSekNOtG9a+qythoUDNKuw==
encDbPass=DSekNOtG9a+qythoUDNKuw==
spring.datasource.url=<Enter AMRIT DB_1097_IDENTITY URL here>
spring.datasource.username=<Enter your AMRIT DB_1097_IDENTITY username>
spring.datasource.password=<Enter your AMRIT DB_1097_IDENTITY password>
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
6 changes: 3 additions & 3 deletions src/main/environment/1097_test.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# DataSource settings: set here your own configurations for the database

spring.datasource.url=jdbc:mysql://10.208.122.38:3306/db_1097_identity?autoReconnect=true&useSSL=false
encDbUserName=0YaEPoKpzM3TrEAHTLYQaf+DfR4mdaeP
encDbPass=V+g/nL6/+ely0bgD7Du0yX83xNRl1H9Y
spring.datasource.url=<Enter AMRIT DB_1097_IDENTITY URL here>
spring.datasource.username=<Enter your AMRIT DB_1097_IDENTITY username>
spring.datasource.password=<Enter your AMRIT DB_1097_IDENTITY password>
spring.datasource.driver-class-name=com.mysql.jdbc.Driver


6 changes: 3 additions & 3 deletions src/main/environment/1097_uat.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# DataSource settings: set here your own configurations for the database

spring.datasource.url=jdbc:mysql://172.16.19.43:3306/db_1097_identity?autoReconnect=true&useSSL=false
encDbUserName=0YaEPoKpzM3TrEAHTLYQaf+DfR4mdaeP
encDbPass=V+g/nL6/+ely0bgD7Du0yX83xNRl1H9Y
spring.datasource.url=<Enter AMRIT DB_1097_IDENTITY URL here>
spring.datasource.username=<Enter your AMRIT DB_1097_IDENTITY username>
spring.datasource.password=<Enter your AMRIT DB_1097_IDENTITY password>
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
6 changes: 3 additions & 3 deletions src/main/environment/common_dev.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DataSource settings: set here your own configurations for the database
spring.datasource.url=jdbc:mysql://10.208.122.32:3306/db_identity?autoReconnect=true&useSSL=false
encDbUserName=0YaEPoKpzM3TrEAHTLYQaf+DfR4mdaeP
encDbPass=V+g/nL6/+ely0bgD7Du0yX83xNRl1H9Y
spring.datasource.url=<Enter AMRIT DB_IDENTITY URL here>
spring.datasource.username=<Enter your AMRIT DB_IDENTITY username>
spring.datasource.password=<Enter your AMRIT DB_IDENTITY password>
spring.datasource.driver-class-name=com.mysql.jdbc.Driver


6 changes: 3 additions & 3 deletions src/main/environment/common_local.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DataSource settings: set here your own configurations for the database
spring.datasource.url=jdbc:mysql://localhost:3306/db_identity?autoReconnect=true&useSSL=false
encDbUserName=DSekNOtG9a+qythoUDNKuw==
encDbPass=DSekNOtG9a+qythoUDNKuw==
spring.datasource.url=<Enter AMRIT DB_IDENTITY URL here>
spring.datasource.username=<Enter your AMRIT DB_IDENTITY username>
spring.datasource.password=<Enter your AMRIT DB_IDENTITY password>
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
Loading

0 comments on commit fc53d1f

Please sign in to comment.