Skip to content

Commit

Permalink
Merge pull request #783 from MadhuMosip/release-0.9.x
Browse files Browse the repository at this point in the history
MOSIP-37782 Moving code from develop to release-0.9.x branch
  • Loading branch information
ckm007 authored Nov 25, 2024
2 parents 2a1d1c1 + 5c5ac65 commit a69ce00
Show file tree
Hide file tree
Showing 40 changed files with 1,218 additions and 576 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ on:
- '!release-branch'
- release-*
- master
- develop
- develop-*
- develop*
- 1*
- MOSIP*

Expand Down Expand Up @@ -57,7 +56,7 @@ jobs:
sonar-analysis:
needs: build-resident-ui
if: "${{ github.event_name != 'pull_request' }}"
uses: mosip/kattu/.github/workflows/npm-sonar-analysis.yml@master
uses: mosip/kattu/.github/workflows/npm-sonar-analysis.yml@develop
with:
SERVICE_LOCATION: resident-ui
SONAR_URL: 'https://sonarcloud.io'
Expand All @@ -66,8 +65,8 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
ORG_KEY: ${{ secrets.ORG_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
build-maven-residenttest:
uses: mosip/kattu/.github/workflows/maven-build.yml@master
build-maven-uitest-resident:
uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: ./residenttest
BUILD_ARTIFACT: residenttest
Expand All @@ -87,12 +86,12 @@ jobs:
SERVICE_LOCATION: residenttest
BUILD_ARTIFACT: residenttest-local
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
ref: ${{ github.ref }}
java-version: 11
distribution: 'temurin'
java-version: '21'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

Expand Down Expand Up @@ -146,7 +145,7 @@ jobs:
BUILD_ARTIFACT: 'residenttest-local'
fail-fast: false
name: ${{ matrix.SERVICE_NAME }}
uses: mosip/kattu/.github/workflows/docker-build.yml@master
uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
Expand All @@ -172,7 +171,7 @@ jobs:
sonar_analysis_residenttest:
needs: build-residentuitests-local
if: "${{ github.event_name != 'pull_request' }}"
uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master
uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master-java21
with:
SERVICE_LOCATION: residenttest
SONAR_URL: 'https://sonarcloud.io'
Expand Down
Empty file modified deploy/copy_cm.sh
100755 → 100644
Empty file.
33 changes: 33 additions & 0 deletions deploy/copy_cm_func.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
# Copy configmap and secret from one namespace to another.
# ./copy_cm_func.sh <resource> <configmap_name> <source_namespace> <destination_namespace> [name]
# Parameters:
# resource: configmap|secret
# name: Optional new name of the configmap or secret in destination namespace. This may be needed if there is
# clash of names

if [ $1 = "configmap" ]
then
RESOURCE=configmap
elif [ $1 = "secret" ]
then
RESOURCE=secret
else
echo "Incorrect resource $1. Exiting.."
exit 1
fi


if [ $# -ge 5 ]
then
kubectl -n $4 delete --ignore-not-found=true $RESOURCE $5
kubectl -n $3 get $RESOURCE $2 -o yaml | sed "s/namespace: $3/namespace: $4/g" | sed "s/name: $2/name: $5/g" | kubectl -n $4 create -f -
else
kubectl -n $4 delete --ignore-not-found=true $RESOURCE $2
kubectl -n $3 get $RESOURCE $2 -o yaml | sed "s/namespace: $3/namespace: $4/g" | kubectl -n $4 create -f -
fi





Empty file modified deploy/copy_secrets.sh
100755 → 100644
Empty file.
11 changes: 11 additions & 0 deletions deploy/README.md → deploy/resident-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
```sh
./install.sh
```

## Restart
```sh
./restart.sh
```

## Delete
```sh
./delete.sh
```

* During the execution of the `install.sh` script, a prompt appears requesting information regarding the presence of a public domain and a valid SSL certificate on the server.
* If the server lacks a public domain and a valid SSL certificate, it is advisable to select the `n` option. Opting it will enable the `init-container` with an `emptyDir` volume and include it in the deployment process.
* The init-container will proceed to download the server's self-signed SSL certificate and mount it to the specified location within the container's Java keystore (i.e., `cacerts`) file.
Expand Down
39 changes: 39 additions & 0 deletions deploy/resident-ui/certs_upload/postman/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Resident Cert Upload (_Work-in-progress_)

The folder here contains Postman Collection to upload RESIDENT certs.

## Prerequisites
Install Postman (browser or command line). The command line version is called `newman`.

## Run
* Inspect `env.json` for any changes in default params.
* Run on command line
```sh
newman run collection.json -e env.json --env-var 'url=https://xxx.yyy.zzz' --env-var 'admin-client-secret=xxxxxxxxxxxx'
```

output:

```
┌─────────────────────────┬─────────────────────┬─────────────────────┐
│ │ executed │ failed │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ iterations │ 1 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ requests │ 8 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ test-scripts │ 8 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ prerequest-scripts │ 4 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ assertions │ 9 │ 0 │
├─────────────────────────┴─────────────────────┴─────────────────────┤
│ total run duration: 3.7s │
├─────────────────────────────────────────────────────────────────────┤
│ total data received: 7.16KB (approx) │
├─────────────────────────────────────────────────────────────────────┤
│ average response time: 432ms [min: 112ms, max: 1461ms, s.d.: 413ms] │
└─────────────────────────────────────────────────────────────────────┘
```
Loading

0 comments on commit a69ce00

Please sign in to comment.