Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5ecc980
[MOSIP-20020] Update release_changes.yml
ckm007 May 12, 2022
0fcd3f6
Merge pull request #174 from mosip/ckm007-patch-1
syedsalman3753 May 12, 2022
5a10d87
[ MOSIP-20021 ] updated release_changes.yml to update README.md badges
May 19, 2022
7c474c5
Merge pull request #175 from syed-salman-technoforte/release-1.2.0.1
ckm007 May 20, 2022
902cd04
[MOSIP-20028] added action for tagging
ckm007 Jul 18, 2022
5af3e86
MOSIP-23596
dhanendra06 Aug 17, 2022
238d9fb
MOSIP-23472
dhanendra06 Aug 17, 2022
dd23fba
Merge pull request #185 from dhanendra06/mosip-101
ckm007 Aug 17, 2022
3e8453f
Merge pull request #184 from dhanendra06/mosip-100
ckm007 Aug 17, 2022
1a80dc7
MOSIP-23472
dhanendra06 Aug 17, 2022
7e7e177
Merge pull request #186 from dhanendra06/mosip-102
ckm007 Aug 17, 2022
f0c9da9
print
Manoprabamp Sep 30, 2022
2644514
MEC
Manoprabamp Sep 30, 2022
0b1d37d
MEC
Manoprabamp Oct 6, 2022
06625ad
Card print service upgradation.
MuralitharanK Oct 7, 2022
af15451
Merge pull request #2 from MuralitharanK/mec_dev_1.2
msp-eagle Oct 8, 2022
d609bc1
Callback url change.
MuralitharanK Oct 12, 2022
cf7fcf8
Maven install trigger file added.
MuralitharanK Oct 12, 2022
dfb018f
Change docker image name
MuralitharanK Oct 12, 2022
041b58f
Address field correction
MuralitharanK Oct 18, 2022
54ec5c9
Address field correction
MuralitharanK Oct 18, 2022
791555a
Address field correction
MuralitharanK Oct 18, 2022
c066652
Address field correction
MuralitharanK Oct 18, 2022
492e2d3
Address field correction
MuralitharanK Oct 19, 2022
42961a6
Merge pull request #3 from MuralitharanK/mec_dev_1.2
msp-eagle Oct 19, 2022
7d2243d
Removing vid related changes as it added as part of policy
MuralitharanK Nov 21, 2022
99bb70a
Adding default photo for infant registration
MuralitharanK Dec 6, 2022
36decdd
Adding default photo for infant registration
MuralitharanK Dec 11, 2022
509b95d
Issue fix on DOB format
MuralitharanK Dec 12, 2022
3269a83
Issue fix on DOB format
MuralitharanK Dec 12, 2022
371e886
Merge pull request #4 from MuralitharanK/mec_dev_1.2
msp-eagle Jan 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/manual_push_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Cardprinter trigger for maven install

on: workflow_dispatch

jobs:
build:

runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets.dev_namespace_docker_hub }}
SERVICE_NAME: msp-print-service
SERVICE_LOCATION: msp-print-service

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
ref: ${{ github.ref }}
java-version: 11
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Setup branch and env
run: |
# Strip git ref prefix from version
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV

- name: Setup branch and GPG public key
run: |
# Strip git ref prefix from version
echo ${{ env.BRANCH_NAME }}
echo ${{ env.GPG_TTY }}
sudo apt-get --yes install gnupg2
# gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
# gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg

- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-${{ env.BRANCH_NAME }}

- name: Setup the settings file for ossrh server
run: echo "<settings> <servers> <server> <id>ossrh</id> <username>${{secrets.ossrh_user}}</username> <password>${{secrets.ossrh_secret}}</password> </server> </servers> <profiles> <profile> <id>ossrh</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <gpg.executable>gpg2</gpg.executable> <gpg.passphrase>${{secrets.gpg_secret}}</gpg.passphrase> </properties> </profile> <profile> <id>allow-snapshots</id> <activation><activeByDefault>true</activeByDefault></activation> <repositories> <repository> <id>snapshots-repo</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <releases><enabled>false</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> <repository> <id>releases-repo</id> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>false</enabled></snapshots> </repository> </repositories> </profile> <profile> <id>sonar</id> <properties> <sonar.sources>.</sonar.sources> <sonar.host.url>https://sonarcloud.io</sonar.host.url> </properties> <activation> <activeByDefault>false</activeByDefault> </activation> </profile> </profiles> </settings>" > $GITHUB_WORKSPACE/settings.xml


- name: Build with Maven
run: |
mvn clean install -U -s $GITHUB_WORKSPACE/settings.xml -DskipTests -Dgpg.skip=true --file pom.xml

- name: Removing target jars
run: |
rm -rf $(find -name '*.jar' ! -executable -type f)

- name: Build image
run: |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }}

- name: Log into registry
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin

- name: Push image
run: |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME

# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
echo "push version ${{steps.getPomVersion.outputs.info}}"
VERSION=$BRANCH_NAME
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
7 changes: 6 additions & 1 deletion .github/workflows/release_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV

- name: update Branch name in badges
run: |
sed -i 's/branch=.*)]/branch=${{ env.BRANCH_NAME }}\)]/g' README.md
sed -i 's/branch=.*\&/branch=${{ env.BRANCH_NAME }}\&/g' README.md

- name: Mannualy changing the pom versions
run: find . -type f -name "*pom.xml" -print0 | xargs -0 sed -i "s/${{ github.event.inputs.snapshotTags }}/${{ github.event.inputs.releaseTags }}/g"

Expand All @@ -48,7 +53,7 @@ jobs:
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ACTION_PAT }}
commit-message: Updated Pom versions for release changes
commit-message: Release Bot Pre-release changes
title: Release changes
body: Automated PR for ${{ github.event.inputs.releaseTags }} release.
branch: release-branch
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Tagging of repos

env:
tag: v1.2.3

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to be published'
required: true
default: 'v1.2.3'
type: string
body:
description: 'Release body message'
required: true
default: 'Changes in this Release'
type: string
pre-release:
description: 'Pre-release? True/False'
required: true
default: False
type: string

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.event.inputs.tag }}
release_name: ${{ github.event.inputs.tag }}
body: |
${{ github.event.inputs.body }}
draft: false
prerelease: ${{fromJSON(github.event.inputs.pre-release)}}
22 changes: 21 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<io.micrometer.prometheus.version>1.4.2</io.micrometer.prometheus.version>
<gson.version>2.8.4</gson.version>
<kernel.websub.version>1.2.0.1-SNAPSHOT</kernel.websub.version>
<kernel.dataaccess.version>1.2.0.1-SNAPSHOT</kernel.dataaccess.version>
<itextcore.version>7.1.0</itextcore.version>
<itexthtml2pdf.version>2.0.0</itexthtml2pdf.version>
<itext.version>5.5.13</itext.version>
Expand All @@ -50,6 +51,7 @@
<bouncycastle.version>1.66</bouncycastle.version>
<jwt.version> 3.8.1</jwt.version>
<google.zxing.version>3.3.3</google.zxing.version>
<postgresql.version>42.2.2</postgresql.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -208,7 +210,16 @@
<artifactId>kernel-websubclient-api</artifactId>
<version>${kernel.websub.version}</version>
</dependency>

<dependency>
<groupId>io.mosip.kernel</groupId>
<artifactId>kernel-auth-adapter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.mosip.kernel</groupId>
<artifactId>kernel-dataaccess-hibernate</artifactId>
<version>${kernel.dataaccess.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
Expand All @@ -234,6 +245,11 @@
<artifactId>ld-signatures-java</artifactId>
<version>0.8.0</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
</dependencies>

<repositories>
Expand All @@ -255,6 +271,10 @@
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>danubetech-maven-public</id>
<url>https://repo.danubetech.com/repository/maven-public/</url>
</repository>
</repositories>

<distributionManagement>
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/io/mosip/print/PrintPDFApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.scheduling.annotation.EnableAsync;
Expand All @@ -14,10 +15,13 @@
import io.mosip.print.service.impl.CbeffImpl;
import io.mosip.print.spi.CbeffUtil;


@SpringBootApplication(scanBasePackages = { "io.mosip.print.*", "${mosip.auth.adapter.impl.basepackage}" }, exclude = { DataSourceAutoConfiguration.class,
@SpringBootApplication(scanBasePackages = { "io.mosip.print.*", "${mosip.auth.adapter.impl.basepackage}" }, exclude = { SecurityAutoConfiguration.class, DataSourceAutoConfiguration.class,
HibernateJpaAutoConfiguration.class,
CacheAutoConfiguration.class })
//
//@SpringBootApplication(scanBasePackages = { "io.mosip.print.*", "${mosip.auth.adapter.impl.basepackage}" }, exclude = { DataSourceAutoConfiguration.class,
// HibernateJpaAutoConfiguration.class,
// CacheAutoConfiguration.class })
@EnableScheduling
@EnableAsync
public class PrintPDFApplication {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/io/mosip/print/constant/ApiName.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ public enum ApiName {
NGINXDMZURL,

IDSCHEMAURL,
CREDENTIALDATAREQUEST,
CREDENTIALDATAREQUESTGENERATOR,
EMAIL_NOTIFICATION


}
2 changes: 1 addition & 1 deletion src/main/java/io/mosip/print/controller/Print.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class Print {
* @throws Exception
*/
@PostMapping(path = "/callback/notifyPrint", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@PreAuthenticateContentAndVerifyIntent(secret = "${mosip.event.secret}", callback = "/v1/print/print/callback/notifyPrint", topic = "${mosip.event.topic}")
@PreAuthenticateContentAndVerifyIntent(secret = "${mosip.event.secret}", callback = "/v1/cardprint/print/callback/notifyPrint", topic = "${mosip.event.topic}")
public ResponseEntity<String> handleSubscribeEvent(@RequestBody EventModel eventModel) throws Exception {
printLogger.info("event recieved from websub"+", id: {}",eventModel.getEvent().getId());
boolean isPrinted = printService.generateCard(eventModel);
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/mosip/print/dto/Errors.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.mosip.print.dto;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.*;

@Data
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class Errors {
String errorCode;
String message;
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/io/mosip/print/dto/PDFSignatureRequestDto.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
package io.mosip.print.dto;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/io/mosip/print/dto/PrintRequest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.mosip.print.dto;

import io.mosip.print.dto.BaseRestRequestDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/io/mosip/print/dto/VidResponseDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import java.io.Serializable;
import java.util.List;

import io.mosip.print.dto.BaseRestResponseDTO;
import io.mosip.print.dto.ErrorDTO;
import lombok.Data;

@Data
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/io/mosip/print/entity/BiometricRecord.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import lombok.Data;


Expand Down
84 changes: 84 additions & 0 deletions src/main/java/io/mosip/print/entity/MspCardEntity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
package io.mosip.print.entity;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.stereotype.Component;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
* The persistent class Processed RegPrc print List database table.
*
* @author Thamaraikannan
* @since 1.0.0
*/

@Component
@Entity
@NoArgsConstructor
@Getter
@Setter
@Table(name = "msp_card", schema = "print")
public class MspCardEntity implements Serializable {
/**
* The Id.
*/
@Id
@Column(name = "id")
private String id;

/**
* The Json Data.
*/
@Column(name = "json_data")
private String jsonData;

/**
* The Province.
*/
@Column(name = "province")
private String province;

@Column(name = "city")
private String city;

@Column(name = "zone")
private String zone;

@Column(name = "agegroup")
private Integer ageGroup;

@Column(name = "introducer")
private String introducer;

@Column(name = "resident")
private String resident;

@Column(name = "registration_center_id")
private String registrationCenterId;

@Column(name = "registration_date")
private LocalDateTime registrationDate;

@Column(name = "download_date")
private LocalDateTime downloadDate;

@Column(name = "request_id")
private String requestId;

@Column(name = "status")
private Integer status;

@Column(name = "request_id1")
private String requestId1;

@Column(name = "birthdate")
private Date birthDate;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.mosip.print.entity;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

Expand Down
Loading