Skip to content

Commit

Permalink
Merge pull request #8 from Mahesh-Binayak/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
aranaravi authored May 16, 2022
2 parents 19c367a + 951a53a commit e168bd2
Show file tree
Hide file tree
Showing 114 changed files with 18,883 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/keys/mosipgpgkey_pub.gpg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQENBF4Voj4BCADMadISO9yCDWMqaIvLSpLbazvjz7Y5Sqdzn7dW0dt1LLbxlnGw
PAq4THeI5/6plotK1sOMVFh7iy57kwYUgzKnWnW5hNDPtaTCWDmrOftiHm0Q/fj2
Zsy3aX0XuySQz7oycTnQ52p3zqGDlnH7zgPQV9dCCAIQMFbJZkoNpZxMRMN2Lnph
112Oi7ujO5/gIcrxLBQXe9zHVU9DT1C1JjY4eTajU9vg+muslwhoT633vYvuhj1q
UBnn6ZLUitw+Z8d6S9B8SEqcbd5O3ODGKhToDK9tC8rZCDFgmgcZYAZnuaJ2/bQB
uePiCKf4jkGpdtpAB4HIr2lGvK2rWbW0l2KpABEBAAG0SG1vc2lwIChUaGlzIGlz
IG1vc2lwIG1hdmVuIGNlbnRyYWwgcmVwbykgPG1vc2lwLmVtYWlsbm90aWZpZXJA
Z21haWwuY29tPokBPwQTAQIAKQUCXhWiPgIbAwUJA8JnAAcLCQgHAwIBBhUIAgkK
CwQWAgMBAh4BAheAAAoJEE7nVSof0F5k2EAIAKdflLyH8H93IFYOWZQtte07Ctu5
SgWbgBpBKUYquTFphDOhplMB5/cik5eY3nSwuhWa1u6bwq/R6GvlnsH5JUkmIM8o
EHCx4GqR5Zq8LoZazqrVycWBkZp7IjKA2kc1MyhLUTLmdPu9/moi78ZRABvSW624
NViSxyoypAMl4hHj4qlL2IEDEyv2/OwKz+Tt7zyk6/mFzpte3MzasSdLDdt5zhIG
s+QofZI7IqQ1C/GSa3R13sliXd+9F/7+edyK10sigRCL5SsmM3Yz/QifeE5+Rd5K
9vx5NTLvCPoNddFhFpXpeD8N3JLdh88mg+AROsI1tJPAuxx/JaS335M5+9m5AQ0E
XhWiPgEIAKuUHcEfHTKInylOj93JeCStbBUC2aeajNZTASGdv62TlFTJsgtyHC7+
b6UYXvdwBB+JbCa1Nv53uVpvl2nrA1KmEm2wwCEh3wQ3Q8k2KDQ2Jm0APpTNCdVy
cPjN1pDwgqwYDkCv8B9ZdC9CuFY/hvU4KOkgk+OYyiQNC2IwKt0tKoGM4eUb7eVt
lFQ9t+Q0araXzefTTYzcP2kSLd6ZIPNyhJTSRiRWRbXLyTRvMQAkl4kF9sp3K3qt
uB5Q9GGpP7NJmF4LB1AxKjYDf12nFT9fqfjzIqW8i3gBc6WgI1bW7V5VTw7rrqCr
AUrJCf3HJv67PJ07gJYvNqstCiZtvBkAEQEAAYkBJQQYAQIADwUCXhWiPgIbDAUJ
A8JnAAAKCRBO51UqH9BeZBFDB/9wZy0IsdD/byau5SjpsVNPDoS7Cu7Ojfd4jFDe
I7ze78DIgXWsIrbWRu18UdbXhFUNJZOEK3lyQOvxpN2cGjSyAHVe2Gir7g/5+qkM
M+28wpGU+OL7ejAfup8vHmAUh6otkthHPGuQ7N2oYk9JVKvm6OjPsWdMb54iJS2x
XQ8FTs3ooRS6/biukRrgoYmX62oDJD4CcCh3UvMUslXtC7L/FX+4hmPx/wWa+iOO
utA+zLgOcjS15SB+pH47JHwHB7NJWr/+nxmkbCU6tOMdyznSCTiYMoF3AKeuxcAs
pD454Eioeq+WZ6CyY6Y278Q/iSnVNP6T1La6CdONdaOBRpdA
=e6L0
-----END PGP PUBLIC KEY BLOCK-----
59 changes: 59 additions & 0 deletions .github/keys/mosipgpgkey_sec.gpg
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
-----BEGIN PGP PRIVATE KEY BLOCK-----

lQPGBF4Voj4BCADMadISO9yCDWMqaIvLSpLbazvjz7Y5Sqdzn7dW0dt1LLbxlnGw
PAq4THeI5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W14RVDSWThCt5ckDr8aTdnBo0sgB1Xthoq+4P+fqp
DDPtvMKRlPji+3owH7qfLx5gFIeqLZLYRzxrkOzdqGJPSVSr5ujoz7FnTG+eIiUt
sV0PBU7N6KEUuv24rpEa4KGJl+tqAyQ+AnAod1LzFLJV7Quy/xV/uIZj8f8Fmvoj
jrrQPsy4DnI0teUgfqR+OyR8BwezSVq//p8ZpGwlOrTjHcs50gk4mDKBdwCnrsXA
LKQ+OeBIqHqvlmegsmOmNu/EP4kp1TT+k9S2ugnTjXWjgUaXQA==
=6YF6
-----END PGP PRIVATE KEY BLOCK-----
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This is a basic workflow to help you get started with Actions

name: Build npm

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master, 1.0.* ]
pull_request:
branches: [ master, 1.0.* ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-resident-ui:
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets. dev_namespace_docker_hub }}
SERVICE_NAME: resident-ui
SERVICE_LOCATION: resident-ui

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-node@v1

- name: npm install
run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts

- name: npm build
run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist

- name: setup environment
run: |
# Strip git ref prefix from version
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')"
echo ${{ env.BRANCH_NAME }}
- name: Build image
run: |
cd "./${{env.SERVICE_LOCATION}}"
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]')
VERSION=$BRANCH_NAME
echo "push version $VERSION"
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
89 changes: 89 additions & 0 deletions .github/workflows/push_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Maven Package upon a push

on:
push:
branches:
- master
- 1.0.*
- develop
- 1.1.*
- MOSIP-11719
- 1.2.*

jobs:
build-resident-ui:
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets. dev_namespace_docker_hub }}
SERVICE_NAME: resident-ui
SERVICE_LOCATION: resident-ui

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-node@v1

- name: npm install
run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts

- name: npm build
run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist

- 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 environment
run: |
# Strip git ref prefix from version
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
# - name: run sonar analysis
# run: |
# cd "./${{env.SERVICE_LOCATION}}"
# echo "sonar.host.url=https://sonarcloud.io/
# sonar.login=${{ secrets.SONAR_TOKEN }}
# sonar.projectKey=mosip_resident-ui
# sonar.organization=${{ secrets.ORG_KEY }}
# sonar.sourceEncoding=UTF-8
# sonar.sources=src
# sonar.exclusions=**/node_modules/**
# sonar.tests=src
# sonar.test.inclusions=**/*.spec.ts
# sonar.typescript.lcov.reportPaths=coverage/lcov.info" >> sonar-project.properties
# npm install sonar-scanner && npm run sonar
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Build image
run: |
cd "./${{env.SERVICE_LOCATION}}"
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]')
VERSION=$BRANCH_NAME
echo "push version $VERSION"
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
# - uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required
# if: failure() # Pick up events even if the job fails or is canceled.

83 changes: 83 additions & 0 deletions .github/workflows/release_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Release maven packages and docker upon a release

on:
release:
types: [published]

jobs:
build-resident-ui:
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets. dev_namespace_docker_hub }}
SERVICE_NAME: resident-ui
SERVICE_LOCATION: resident-ui

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-node@v1

- name: npm install
run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts

- name: npm build
run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist

- 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 environment
run: |
# Strip git ref prefix from version
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
- name: run sonar analysis
run: |
cd "./${{env.SERVICE_LOCATION}}"
echo "sonar.host.url=https://sonarcloud.io/
sonar.login=${{ secrets.SONAR_TOKEN }}
sonar.projectKey=mosip_resident-ui
sonar.organization=${{ secrets.ORG_KEY }}
sonar.sourceEncoding=UTF-8
sonar.sources=src
sonar.exclusions=**/node_modules/**
sonar.tests=src
sonar.test.inclusions=**/*.spec.ts
sonar.typescript.lcov.reportPaths=coverage/lcov.info" >> sonar-project.properties
npm install sonar-scanner && npm run sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Build image
run: |
cd "./${{env.SERVICE_LOCATION}}"
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]')
VERSION=$BRANCH_NAME
echo "push version $VERSION"
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
# - uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required
# if: failure() # Pick up events even if the job fails or is canceled.

13 changes: 13 additions & 0 deletions resident-ui/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
44 changes: 44 additions & 0 deletions resident-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules

# profiling files
chrome-profiler-events.json
speed-measure-plugin.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
Loading

0 comments on commit e168bd2

Please sign in to comment.