Skip to content

Commit

Permalink
merged release -1.2.0 (mosip#68)
Browse files Browse the repository at this point in the history
* Created 1.2.0-rc2 (mosip#23)

Co-authored-by: Monobikash Das <M1045447@mindtree.com>

* MOSIP-15420: Upgraded swagger2.0 to openapi3.0 for packet manager service (mosip#31)

Resolved merge conflict

* Added logger and fixed test cases (mosip#32)

Co-authored-by: Monobikash Das <M1045447@mindtree.com>

* MOSIP-15420: Generated openapi.json for packet manager service (mosip#34)

* MOSIP-15420: Upgraded swagger2.0 to openapi3.0 for packet manager service

Resolved merge conflict

* MOSIP-15420: Generated openapi.json for packet manager service

Resolved merge conflicts

* MOSIP-18453 : improved usage of caching (mosip#36)

Co-authored-by: Monobikash Das <M1045447@mindtree.com>

* Added sonar_analysis

* MOSIP-18450 : added exception for objects not available in minio (mosip#37)

* MOSIP-18450 : added exception for objects not available in minio

* Added sonar_analysis

* MOSIP-18910 : fixed refNumber issue in DocumentDto

* MOSIP-18450 : added exception for objects not available in minio

* MOSIP-18910 : fixed refNumber issue in DocumentDto

* initial change

* MOSIP-18450 : added exception for objects not available in minio

* MOSIP-18910 : fixed refNumber issue in DocumentDto

* initial change

* MOSIP-18793 :Added afterburner + fixes

Co-authored-by: Monobikash Das <M1045447@mindtree.com>
Co-authored-by: Rakshitha650 <76676196+Rakshitha650@users.noreply.github.com>
Co-authored-by: Mandeep Dhiman <46880392+mandeepdhiman123@users.noreply.github.com>
Co-authored-by: Admin <Admin@MONOBIKASH>

* Mosip:15286 Changed openapi.json name.

* updated the Sonar_analysis code and removed the Dskiptests

* updated the Sonar_analysis code and removed the Dskiptests

* added gpg keys

* changes for real bio

* Merged with 1.2.0-rc2

* changes for real bio

* Auth role issue fixed (mosip#46)

* MOR-147 : multithreading issue for create packet api (mosip#52)

Co-authored-by: Admin <Admin@MONOBIKASH>

* Added documentation

* Update README.md

* Update README.md

* [MOSIP-19587] Cleanup.

* Update configuration.md

* Update configuration.md

* Update configuration.md

* Updated readme and sonar fix

* Update README.md

* [MOSIP-19883] updated worflows

* [MOSIP-19883] updated worflows

* Update push_trigger.yml

* Updated Pom versions for release changes

Co-authored-by: Monobikash Das <M1045447@mindtree.com>
Co-authored-by: kameshsr <47484458+kameshsr@users.noreply.github.com>
Co-authored-by: Rakshitha650 <76676196+Rakshitha650@users.noreply.github.com>
Co-authored-by: Mandeep Dhiman <46880392+mandeepdhiman123@users.noreply.github.com>
Co-authored-by: Admin <Admin@MONOBIKASH>
Co-authored-by: Rakshith650 <rakshitham38@gmail.com>
Co-authored-by: Sasikumar Ganesan <gsasikumar@gmail.com>
Co-authored-by: Puneet Joshi <48353425+pjoshi751@users.noreply.github.com>
Co-authored-by: Puneet Joshi <puneet@mosip.io>
Co-authored-by: ckm007 <chandrakeshavmishra@gmail.com>
Co-authored-by: ckm007 <ckm007@users.noreply.github.com>
Signed-off-by: Sowmya Ujjappa Banakar <sowmya.61022006@ltimindtree.com>
  • Loading branch information
12 people authored and Sowmya Ujjappa Banakar committed Mar 6, 2024
1 parent fa551f1 commit 830971d
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 14 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/release_changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release/pre-release Preparation.

on:
workflow_dispatch:
inputs:
message:
description: 'Triggered for release or pe-release'
required: false
default: 'Release Preparation'
releaseTags:
description: 'tag to update'
required: true
snapshotTags:
description: 'tag to be replaced'
required: true
base:
description: 'base branch for PR'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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: 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"

- name: Updating the Release URL in POM
run: |
cd .github/workflows
sed -i 's/OSSRH_SNAPSHOT_URL/RELEASE_URL/g' push_trigger.yml
- name: Updating libs-snapshot-local to libs-release local for artifactory URL's.
run: find . -type f -name "*Dockerfile" -print0 | xargs -0 sed -i "s/libs-snapshot-local/libs-release-local/g"

- name: removing -DskipTests
run: find . -type f -name "*push_trigger.yml" -print0 | xargs -0 sed -i "s/"-DskipTests"//g"

# - name: removing --Dgpg.skip
# run: find . -type f -name "*push_trigger.yml" -print0 | xargs -0 sed -i "s/"-Dgpg.skip"//g"

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ACTION_PAT }}
commit-message: Updated Pom versions for release changes
title: Release changes
body: Automated PR for ${{ github.event.inputs.releaseTags }} release.
branch: release-branch
delete-branch: true
base: ${{ github.event.inputs.base }}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
Expand Down Expand Up @@ -98,7 +97,7 @@ public byte[] sign(byte[] packet) {
.parse(DateUtils.getUTCCurrentDateTimeString(DATETIME_PATTERN), format);
request.setRequesttime(localdatetime);
HttpEntity<RequestWrapper<TpmSignRequestDto>> httpEntity = new HttpEntity<>(request);
ResponseEntity<String> response = getRestTemplate().exchange(keymanagerCsSignUrl, HttpMethod.POST, httpEntity,
ResponseEntity<String> response = restTemplate.exchange(keymanagerCsSignUrl, HttpMethod.POST, httpEntity,
String.class);
LinkedHashMap responseMap = (LinkedHashMap) mapper.readValue(response.getBody(), LinkedHashMap.class).get("response");
if (responseMap != null && responseMap.size() > 0)
Expand Down Expand Up @@ -144,7 +143,7 @@ public byte[] encrypt(String refId, byte[] packet) {
request.setVersion(APPLICATION_VERSION);
HttpEntity<RequestWrapper<CryptomanagerRequestDto>> httpEntity = new HttpEntity<>(request);

ResponseEntity<String> response = getRestTemplate().exchange(cryptomanagerEncryptUrl, HttpMethod.POST, httpEntity, String.class);
ResponseEntity<String> response = restTemplate.exchange(cryptomanagerEncryptUrl, HttpMethod.POST, httpEntity, String.class);
CryptomanagerResponseDto responseObject = mapper.readValue(response.getBody(), CryptomanagerResponseDto.class);
if (responseObject != null &&
responseObject.getErrors() != null && !responseObject.getErrors().isEmpty()) {
Expand Down Expand Up @@ -214,7 +213,7 @@ public byte[] decrypt(String refId, byte[] packet) {
request.setVersion(APPLICATION_VERSION);
HttpEntity<RequestWrapper<CryptomanagerRequestDto>> httpEntity = new HttpEntity<>(request);

ResponseEntity<String> response = getRestTemplate().exchange(cryptomanagerDecryptUrl, HttpMethod.POST, httpEntity, String.class);
ResponseEntity<String> response = restTemplate.exchange(cryptomanagerDecryptUrl, HttpMethod.POST, httpEntity, String.class);

CryptomanagerResponseDto responseObject = mapper.readValue(response.getBody(), CryptomanagerResponseDto.class);

Expand Down Expand Up @@ -271,7 +270,7 @@ public boolean verify(String refId, byte[] packet, byte[] signature) {
.parse(DateUtils.getUTCCurrentDateTimeString(DATETIME_PATTERN), format);
request.setRequesttime(localdatetime);
HttpEntity<RequestWrapper<TpmSignVerifyRequestDto>> httpEntity = new HttpEntity<>(request);
ResponseEntity<String> response = getRestTemplate().exchange(keymanagerCsverifysignUrl, HttpMethod.POST, httpEntity,
ResponseEntity<String> response = restTemplate.exchange(keymanagerCsverifysignUrl, HttpMethod.POST, httpEntity,
String.class);
LinkedHashMap responseMap = (LinkedHashMap) mapper.readValue(response.getBody(), LinkedHashMap.class).get("response");//.get("signature");
if (responseMap != null && responseMap.size() > 0) {
Expand All @@ -298,7 +297,7 @@ public boolean verify(String refId, byte[] packet, byte[] signature) {

private String getPublicKey(String refId) throws IOException {
String machineId = refId.split("_")[1];
ResponseEntity<String> response = getRestTemplate().exchange(syncdataGetTpmKeyUrl+machineId, HttpMethod.GET, null,
ResponseEntity<String> response = restTemplate.exchange(syncdataGetTpmKeyUrl+machineId, HttpMethod.GET, null,
String.class);
LinkedHashMap responseMap = (LinkedHashMap) mapper.readValue(response.getBody(), LinkedHashMap.class).get("response");//.get("signature");
if (responseMap != null && responseMap.size() > 0)
Expand All @@ -309,12 +308,4 @@ private String getPublicKey(String refId) throws IOException {
throw new SignatureException();
}
}

private RestTemplate getRestTemplate() {
if (this.restTemplate == null) {
this.restTemplate = (RestTemplate)this.applicationContext.getBean("selfTokenRestTemplate");
}

return this.restTemplate;
}
}

0 comments on commit 830971d

Please sign in to comment.