Skip to content

Commit

Permalink
Merge pull request #652 from pg-techno123/develop-java21
Browse files Browse the repository at this point in the history
Develop java21
  • Loading branch information
lsivanand authored Sep 13, 2024
2 parents 20b04cc + 7670ebd commit 77d56ff
Show file tree
Hide file tree
Showing 125 changed files with 2,192 additions and 4,910 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/automationtests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build-maven-automationtest:
uses: mosip/kattu/.github/workflows/maven-build.yml@master
uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: ./
BUILD_ARTIFACT: automationtest
Expand All @@ -29,11 +29,11 @@ jobs:
BUILD_ARTIFACT: mosip-acceptance-tests
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
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
4 changes: 2 additions & 2 deletions .github/workflows/dslorchestrator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
ONLY_DOCKER: true
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 @@ -55,7 +55,7 @@ jobs:
sonar_analysis:
needs: call-automationtests
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: ./
PROJECT_KEY: mosip_mosip-dsl-test-rig
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/packetcreator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
cp -r ./src/main/resources/dockersupport/centralized/mountvolume/profile_resource ./profile_resource
zip -r ${{ env.NEW_BUILD_ARTIFACT }}.zip build_files/* profile_resource
- name: Upload the springboot jars
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: ${{ env.NEW_BUILD_ARTIFACT }}
path: ./${{env.SERVICE_LOCATION}}/${{ env.NEW_BUILD_ARTIFACT }}.zip
Expand All @@ -76,7 +76,7 @@ jobs:
ONLY_DOCKER: true
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 @@ -91,7 +91,7 @@ jobs:
sonar_analysis:
needs: call-automationtests
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: ./
PROJECT_KEY: mosip_mosip-dsl-test-rig
Expand Down
186 changes: 186 additions & 0 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
name: Maven Package upon a push

on:
release:
types: [published]
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
inputs:
message:
description: 'Message for manually triggering'
required: false
default: 'Triggered for Updates'
type: string
push:
branches:
- '!release-branch'
- release*
- master
- develop*
- 1.*
- MOSIP*

jobs:
build-maven-automationtest:
uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: ./
BUILD_ARTIFACT: automationtest
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-automationtests-local:
needs: build-maven-automationtest
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets.dev_namespace_docker_hub }}
SERVICE_NAME: mosip-acceptance-tests
SERVICE_LOCATION: mosip-acceptance-tests
BUILD_ARTIFACT: mosip-acceptance-tests
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
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

- 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 Automationtests with Maven
run: |
cd ${{ env.SERVICE_LOCATION}}
mvn clean package -s $GITHUB_WORKSPACE/settings.xml
- name: Copy configuration files to target directory.
run: |
cd ./${{env.SERVICE_LOCATION}}
mkdir build_files
cp $( find -name 'dslrig-ivv-orchestrator-*-dependencies.jar' -type f ) build_files
cp -r ./ivv-orchestrator/target/classes/config build_files/
cp -r ./ivv-orchestrator/target/classes/local build_files/
cp -r ./ivv-orchestrator/src/main/resources/local/scenarios scenarios
zip -r ${{env.BUILD_ARTIFACT}}.zip build_files/* scenarios/
- name: Ready the springboot artifacts
if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }}
run: |
## FIND JARS & COPY ONLY EXECUTABLE JARs STORED UNDER TARGET DIRECTORY
cd ${{ env.SERVICE_LOCATION }} && find ./ -path '*/target/*' -exec zip ${{ env.BUILD_ARTIFACT }}.zip {} +
- name: Upload the springboot jars
if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.BUILD_ARTIFACT }}
path: ./${{ env.SERVICE_LOCATION }}/${{ env.BUILD_ARTIFACT }}.zip

- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,commit,workflow,job # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: failure() # Pick up events even if the job fails or is canceled.

build-dsl-orchestrator-docker:
needs: build-automationtests-local
strategy:
matrix:
include:
- SERVICE_LOCATION: 'mosip-acceptance-tests/ivv-orchestrator'
SERVICE_NAME: 'dsl-orchestrator'
BUILD_ARTIFACT: 'mosip-acceptance-tests'
ONLY_DOCKER: true
fail-fast: false
name: ${{ matrix.SERVICE_NAME }}
uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }}
ONLY_DOCKER: ${{ matrix.ONLY_DOCKER }}
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 }}
## Recreate zips to provide support for docker unzip operation
recreate-packet-creator-zips:
needs: build-maven-automationtest
runs-on: ubuntu-latest
env:
BUILD_ARTIFACT: automationtest
NEW_BUILD_ARTIFACT: mosip-packet-creator
ZIP_FILE_NAME: mosippacketcreator
SERVICE_LOCATION: mosip-packet-creator
CONFIG_LOCATION: 'src/main/resources/dockersupport/centralized/mosip-packet-creator'
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
if: ${{ ( env.BUILD_ARTIFACT != 'false' ) }}
with:
name: ${{ env.BUILD_ARTIFACT }}
path: ./
- name: recreate zip
run: |
unzip -uj "${{ env.BUILD_ARTIFACT }}.zip" -d "${{ env.SERVICE_LOCATION }}/"
cd ./${{env.SERVICE_LOCATION}}
mkdir -p build_files/config
cp $( find -name 'dslrig-packetcreator-*.jar' -type f ) build_files
cp -r ${{env.CONFIG_LOCATION}}/Biometric\ Devices build_files/Biometric\ Devices
#cp -r ${{env.CONFIG_LOCATION}}/config build_files/config
cp -r src/main/resources/application.properties build_files/config/
cp -r ${{env.CONFIG_LOCATION}}/resource build_files/resource
cp -r ${{env.CONFIG_LOCATION}}/application.properties build_files/application.properties
cp -r ./src/main/resources/dockersupport/centralized/mountvolume/profile_resource ./profile_resource
zip -r ${{ env.NEW_BUILD_ARTIFACT }}.zip build_files/* profile_resource
- name: Upload the springboot jars
uses: actions/upload-artifact@v3
with:
name: ${{ env.NEW_BUILD_ARTIFACT }}
path: ./${{env.SERVICE_LOCATION}}/${{ env.NEW_BUILD_ARTIFACT }}.zip

build-mosip-packet-creator-dockers:
needs: recreate-packet-creator-zips
strategy:
matrix:
include:
- SERVICE_LOCATION: 'mosip-packet-creator'
SERVICE_NAME: 'dsl-packetcreator'
BUILD_ARTIFACT: 'mosip-packet-creator'
ONLY_DOCKER: true
fail-fast: false
name: ${{ matrix.SERVICE_NAME }}
uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }}
ONLY_DOCKER: ${{ matrix.ONLY_DOCKER }}
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 }}

sonar_analysis:
needs: build-maven-automationtest
if: "${{ github.event_name != 'pull_request' }}"
uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master-java21
with:
SERVICE_LOCATION: ./
PROJECT_KEY: mosip_mosip-dsl-test-rig
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
ORG_KEY: ${{ secrets.ORG_KEY }}
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 }}
37 changes: 36 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
deploy*/
.idea
target*
target*

HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
*.log
17 changes: 0 additions & 17 deletions .project

This file was deleted.

4 changes: 4 additions & 0 deletions mosip-acceptance-tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@
*.jar
*.log
/.tmp
*.settings/*
.settings/
.classpath
.project
17 changes: 0 additions & 17 deletions mosip-acceptance-tests/.project

This file was deleted.

4 changes: 0 additions & 4 deletions mosip-acceptance-tests/.settings/org.eclipse.m2e.core.prefs

This file was deleted.

28 changes: 0 additions & 28 deletions mosip-acceptance-tests/ivv-core/.classpath

This file was deleted.

Loading

0 comments on commit 77d56ff

Please sign in to comment.