diff --git a/.github/keys/mosipgpgkey_pub.gpg b/.github/keys/mosipgpgkey_pub.gpg
new file mode 100644
index 0000000..4bdb1a9
Binary files /dev/null and b/.github/keys/mosipgpgkey_pub.gpg differ
diff --git a/.github/keys/mosipgpgkey_sec.gpg b/.github/keys/mosipgpgkey_sec.gpg
new file mode 100644
index 0000000..97de556
Binary files /dev/null and b/.github/keys/mosipgpgkey_sec.gpg differ
diff --git a/.github/workflows/mediator_push_trigger.yml b/.github/workflows/mediator_push_trigger.yml
deleted file mode 100644
index 6b6c175..0000000
--- a/.github/workflows/mediator_push_trigger.yml
+++ /dev/null
@@ -1,102 +0,0 @@
-name: Mediator Maven Package and docker upon a push
-
-on:
- push:
- paths:
- - mediator/**
- branches:
- - '!release-branch'
- - release-1*
- - master
- - 1.*
- - develop*
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 11
- uses: actions/setup-java@v1
- with:
- ref: ${{ github.ref }}
- java-version: 11
-
- - name: Setup branch and env
- run: |
- # Strip git ref prefix from version
- echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
-
- - uses: actions/cache@v1
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-${{ env.BRANCH_NAME }}
-
- - name: Build Mediator with Maven
- run: |
- cd mediator
- mvn -B clean package
-
- - name: Ready the springboot artifacts
- run: find -name '*.jar' -type f -exec zip release.zip {} +
-
- - name: Upload the springboot jars
- uses: actions/upload-artifact@v1
- with:
- name: release
- path: ./release.zip
-
- docker-opencrvs-mediator:
- needs: build
- runs-on: ubuntu-latest
- env:
- NAMESPACE: ${{ secrets.dev_namespace_docker_hub }}
- SERVICE_NAME: mosip-opencrvs-mediator
- SERVICE_LOCATION: mediator
- steps:
- - uses: actions/checkout@v2
- - uses: actions/download-artifact@v1
- with:
- name: release
- path: ./
-
- - name: Setup branch and version
- run: |
- # Strip git ref prefix from version
- echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
-
- - name: Get version info from pom
- id: getPomVersion
- uses: mavrosxristoforos/get-xml-info@1.0
- with:
- xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml
- xpath: /*[local-name()="project"]/*[local-name()="version"]
-
- - name: Unzip and extract the resident-service
- run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target"
-
- - 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]')
- echo "push version ${{steps.getPomVersion.outputs.info}}"
- if [[ $BRANCH_NAME == main || $BRANCH_NAME == master ]]; then
- VERSION=latest
- else
- VERSION=$BRANCH_NAME
- fi
- echo IMAGE_ID=$IMAGE_ID
- echo VERSION=$VERSION
- docker tag $SERVICE_NAME $IMAGE_ID:$VERSION
- docker push $IMAGE_ID:$VERSION
diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml
new file mode 100644
index 0000000..3f9797f
--- /dev/null
+++ b/.github/workflows/push-trigger.yml
@@ -0,0 +1,89 @@
+name: Maven Package upon a push
+
+on:
+ release:
+ types: [published]
+ pull_request:
+ types: [opened]
+ workflow_dispatch:
+ inputs:
+ message:
+ description: 'Message for manually triggering'
+ required: false
+ default: 'Triggered for Updates'
+ type: string
+ push:
+ branches:
+ - '!release-branch'
+ - master
+ - 1.*
+ - develop
+ - MOSIP*
+ - release*
+
+jobs:
+ build-maven-opencrvs-mediator:
+ uses: mosip/kattu/.github/workflows/maven-build.yml@master
+ with:
+ SERVICE_LOCATION: mediator
+ BUILD_ARTIFACT: opencrvs-mediator
+ secrets:
+ OSSRH_USER: ${{ secrets.OSSRH_USER }}
+ OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
+ OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
+ GPG_SECRET: ${{ secrets.GPG_SECRET }}
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
+
+ build-dockers:
+ needs: build-maven-opencrvs-mediator
+ strategy:
+ matrix:
+ include:
+ - SERVICE_LOCATION: 'mediator'
+ SERVICE_NAME: 'mosip-opencrvs-mediator'
+ BUILD_ARTIFACT: 'opencrvs-mediator'
+ fail-fast: false
+ name: ${{ matrix.SERVICE_NAME }}
+ uses: mosip/kattu/.github/workflows/docker-build.yml@master
+ with:
+ SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
+ SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
+ BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }}
+ secrets:
+ DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }}
+ ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }}
+ RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
+
+ build-maven-regproc-opencrvs-stage:
+ uses: mosip/kattu/.github/workflows/maven-build.yml@master
+ with:
+ SERVICE_LOCATION: registration-processor-opencrvs-stage
+ BUILD_ARTIFACT: registration-processor-opencrvs-stage
+ secrets:
+ OSSRH_USER: ${{ secrets.OSSRH_USER }}
+ OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
+ OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
+ GPG_SECRET: ${{ secrets.GPG_SECRET }}
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
+
+ build-dockers-regproc-opencrvs-stage:
+ needs: build-maven-regproc-opencrvs-stage
+ strategy:
+ matrix:
+ include:
+ - SERVICE_LOCATION: 'registration-processor-opencrvs-stage'
+ SERVICE_NAME: 'registration-processor-opencrvs-stage'
+ BUILD_ARTIFACT: 'registration-processor-opencrvs-stage'
+ fail-fast: false
+ name: ${{ matrix.SERVICE_NAME }}
+ uses: mosip/kattu/.github/workflows/docker-build.yml@master
+ with:
+ SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
+ SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
+ BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }}
+ secrets:
+ DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }}
+ ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }}
+ RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
\ No newline at end of file
diff --git a/.github/workflows/regproc_stage_push_trigger.yml b/.github/workflows/regproc_stage_push_trigger.yml
deleted file mode 100644
index 0f72ea1..0000000
--- a/.github/workflows/regproc_stage_push_trigger.yml
+++ /dev/null
@@ -1,102 +0,0 @@
-name: Regproc Opencrvs Stage Maven Package and docker upon a push
-
-on:
- push:
- paths:
- - registration-processor-opencrvs-stage/**
- branches:
- - '!release-branch'
- - release-1*
- - master
- - 1.*
- - develop*
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 11
- uses: actions/setup-java@v1
- with:
- ref: ${{ github.ref }}
- java-version: 11
-
- - name: Setup branch and env
- run: |
- # Strip git ref prefix from version
- echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
-
- - uses: actions/cache@v1
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-${{ env.BRANCH_NAME }}
-
- - name: Build Regproc Stage with Maven
- run: |
- cd registration-processor-opencrvs-stage
- mvn -B clean package
-
- - name: Ready the springboot artifacts
- run: find -name '*.jar' -type f -exec zip release.zip {} +
-
- - name: Upload the springboot jars
- uses: actions/upload-artifact@v1
- with:
- name: release
- path: ./release.zip
-
- docker-repgroc-opencrvs-stage:
- needs: build
- runs-on: ubuntu-latest
- env:
- NAMESPACE: ${{ secrets.dev_namespace_docker_hub }}
- SERVICE_NAME: registration-processor-opencrvs-stage
- SERVICE_LOCATION: registration-processor-opencrvs-stage
- steps:
- - uses: actions/checkout@v2
- - uses: actions/download-artifact@v1
- with:
- name: release
- path: ./
-
- - name: Setup branch and version
- run: |
- # Strip git ref prefix from version
- echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
-
- - name: Get version info from pom
- id: getPomVersion
- uses: mavrosxristoforos/get-xml-info@1.0
- with:
- xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml
- xpath: /*[local-name()="project"]/*[local-name()="version"]
-
- - name: Unzip and extract the resident-service
- run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target"
-
- - 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]')
- echo "push version ${{steps.getPomVersion.outputs.info}}"
- if [[ $BRANCH_NAME == main || $BRANCH_NAME == master ]]; then
- VERSION=latest
- else
- VERSION=$BRANCH_NAME
- fi
- echo IMAGE_ID=$IMAGE_ID
- echo VERSION=$VERSION
- docker tag $SERVICE_NAME $IMAGE_ID:$VERSION
- docker push $IMAGE_ID:$VERSION
diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml
new file mode 100644
index 0000000..9a5b079
--- /dev/null
+++ b/.github/workflows/tag.yml
@@ -0,0 +1,35 @@
+name: Tagging of repos
+
+on:
+ workflow_dispatch:
+ inputs:
+ TAG:
+ description: 'Tag to be published'
+ required: true
+ 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
+ DRAFT:
+ description: 'Draft? True/False'
+ required: false
+ default: False
+ type: string
+
+jobs:
+ tag-branch:
+ uses: mosip/kattu/.github/workflows/tag.yml@master
+ with:
+ TAG: ${{ inputs.TAG }}
+ BODY: ${{ inputs.BODY }}
+ PRE_RELEASE: ${{ inputs.PRE_RELEASE }}
+ DRAFT: ${{ inputs.DRAFT }}
+ secrets:
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
\ No newline at end of file
diff --git a/mediator/pom.xml b/mediator/pom.xml
index a57d0f7..ff4788b 100644
--- a/mediator/pom.xml
+++ b/mediator/pom.xml
@@ -8,6 +8,29 @@
opencrvs-mediator
opencrvs-mediator
1.2.1-SNAPSHOT
+
+
+
+ MPL 2.0
+ https://www.mozilla.org/en-US/MPL/2.0/
+
+
+
+ scm:git:git://github.com/mosip/mosip-opencrvs.git
+ scm:git:ssh://github.com:mosip/mosip-opencrvs.git
+ https://github.com/mosip/mosip-opencrvs
+ HEAD
+
+
+
+
+ Mosip
+ mosip.emailnotifier@gmail.com
+ io.mosip
+ https://github.com/mosip/mosip-opencrvs
+
+
+
1.2.0
1.2.0
@@ -141,6 +164,51 @@
11
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+ pl.project13.maven
+ git-commit-id-plugin
+ 3.0.1
+
+
+ get-the-git-infos
+
+ revision
+
+ validate
+
+
+
+ true
+ ${project.build.outputDirectory}/git.properties
+
+ ^git.build.(time|version)$
+ ^git.commit.id.(abbrev|full)$
+
+ full
+ ${project.basedir}/.git
+
+
+
maven-surefire-plugin
2.22.1
@@ -163,6 +231,84 @@
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+ true
+ ZIP
+
+
+
+
+ build-info
+ repackage
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+ true
+ ZIP
+
+
+
+ pre-integration-test
+
+ start
+
+
+
+ src/test/resources
+
+
+ openapi-profile
+
+
+ --server.port=8090
+ --server.servlet.path=/app/generic
+
+
+
+
+ post-integration-test
+
+ stop
+
+
+
+
+ build-info
+ repackage
+
+
+
+
+
+ org.springdoc
+ springdoc-openapi-maven-plugin
+ 0.2
+
+
+ integration-test
+
+ generate
+
+
+
+
+ http://localhost:8090/app/generic/v3/api-docs
+ ${name}-openapi.json
+
+ ${project.build.directory}
+ false
+
+
diff --git a/registration-processor-opencrvs-stage/pom.xml b/registration-processor-opencrvs-stage/pom.xml
index 6291d35..9889a3f 100644
--- a/registration-processor-opencrvs-stage/pom.xml
+++ b/registration-processor-opencrvs-stage/pom.xml
@@ -8,6 +8,29 @@
registration-processor-opencrvs-stage
registration-processor-opencrvs-stage
1.2.1-SNAPSHOT
+
+
+
+ MPL 2.0
+ https://www.mozilla.org/en-US/MPL/2.0/
+
+
+
+ scm:git:git://github.com/mosip/mosip-opencrvs.git
+ scm:git:ssh://github.com:mosip/mosip-opencrvs.git
+ https://github.com/mosip/mosip-opencrvs
+ HEAD
+
+
+
+
+ Mosip
+ mosip.emailnotifier@gmail.com
+ io.mosip
+ https://github.com/mosip/mosip-opencrvs
+
+
+
11
11
@@ -42,6 +65,16 @@
+
+
+ ossrh
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
+ ossrh
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
org.mockito
@@ -185,6 +218,51 @@
11
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+ pl.project13.maven
+ git-commit-id-plugin
+ 3.0.1
+
+
+ get-the-git-infos
+
+ revision
+
+ validate
+
+
+
+ true
+ ${project.build.outputDirectory}/git.properties
+
+ ^git.build.(time|version)$
+ ^git.commit.id.(abbrev|full)$
+
+ full
+ ${project.basedir}/.git
+
+
+
org.springframework.boot
spring-boot-maven-plugin