From 8f04c18f35e32c5449f2a10dce211fbf1106cfe1 Mon Sep 17 00:00:00 2001 From: Mohanachandran S Date: Wed, 11 Sep 2024 13:56:58 +0530 Subject: [PATCH] MOSIP-35671 -Merging java21 with develop Signed-off-by: Mohanachandran S --- .github/workflows/push-trigger.yml | 20 +- apitest/Dockerfile | 24 +- apitest/pom.xml | 482 +++++++++++------------------ 3 files changed, 199 insertions(+), 327 deletions(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 60dffdcf184..b7a618a589b 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -91,7 +91,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} build-maven-apitest-auth: - uses: mosip/kattu/.github/workflows/maven-build.yml@master + uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21 with: SERVICE_LOCATION: ./apitest BUILD_ARTIFACT: apitest-auth @@ -105,7 +105,7 @@ jobs: publish_to_nexus_apitest_auth: if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}" needs: build-maven-apitest-auth - uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master + uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21 with: SERVICE_LOCATION: ./apitest secrets: @@ -125,12 +125,12 @@ jobs: SERVICE_LOCATION: apitest BUILD_ARTIFACT: apitest-auth-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 - name: Setup the settings file for ossrh server @@ -173,7 +173,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 }} @@ -188,7 +188,7 @@ jobs: sonar_analysis_apitest_auth: needs: build-maven-apitest-auth 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: ./apitest secrets: @@ -198,4 +198,4 @@ jobs: OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} GPG_SECRET: ${{ secrets.GPG_SECRET }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file diff --git a/apitest/Dockerfile b/apitest/Dockerfile index 17c93661229..441bd23c04c 100644 --- a/apitest/Dockerfile +++ b/apitest/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:11 +FROM mosipdev/openjdk-21-jre:latest ARG SOURCE ARG COMMIT_HASH @@ -35,17 +35,17 @@ COPY ["Biometric Devices", "$work_dir/Biometric Devices"] COPY ["resource", "$work_dir/resource"] COPY entrypoint.sh $work_dir -# Combine all RUN commands into a single layer -RUN apt-get -y update && \ - apt-get install -y unzip jq && \ - groupadd -g ${container_user_gid} ${container_user_group} && \ - useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} && \ - curl -LO "https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \ - chmod +x kubectl && \ - mv kubectl /usr/local/bin/ && \ - chown -R ${container_user}:${container_user} /home/${container_user} /usr/local/openjdk-11/lib/security/cacerts && \ - chmod 644 /usr/local/openjdk-11/lib/security/cacerts && \ - chmod +x $work_dir/entrypoint.sh +# install packages and create user +RUN apt-get -y update \ +&& apt-get install -y unzip jq curl \ +&& groupadd -g ${container_user_gid} ${container_user_group} \ +&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/bash -m ${container_user} \ +&& curl -LO "https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" \ +&& mkdir -p /home/${container_user} \ +&& chmod +x kubectl $work_dir/entrypoint.sh \ +&& mv kubectl /usr/local/bin/ \ +&& chown -R ${container_user}:${container_user} /home/${container_user} /etc/ssl/certs/java/cacerts \ +&& chmod 644 /etc/ssl/certs/java/cacerts #select container user for all tasks diff --git a/apitest/pom.xml b/apitest/pom.xml index 1b76e0fff93..55440ecf747 100644 --- a/apitest/pom.xml +++ b/apitest/pom.xml @@ -6,7 +6,7 @@ apitest-auth jar apitest-auth - Parent project of apitest-auth + Parent project of MOSIP Id Authentication apitests https://github.com/mosip/id-authentication 1.2.1-SNAPSHOT @@ -33,157 +33,39 @@ - - UTF-8 - 11 - 11 - 3.7.0 + 21 + 21 + 3.8.0 3.0.2 3.1.0 - 2.9 - 0.8.1 - 3.2 - 3.0.1 - 2.3 - false - 3.7.0.1746 - - 2.0.2.RELEASE - 2.0.7.RELEASE - 5.0.5.RELEASE - 2.0.0.RELEASE - - 2.0.7 - 1.5.20 - 2.9.2 - - 3.6.2 - 3.7.0 - - - - 1.2 - 3.0.0 - 1.3 - 2.2 - 2.0.1.Final - 2.2.6 - - - 1.4.197 - 5.1.46 - 42.2.2 - 2.5.0 - 6.0.12.Final - - - 1.10.19 - 1.7.4 - 2.0.0-beta.5 - - - 3.6.1 - 3.7 - 2.6 - 1.11 - 4.3 - 1.9.2 - 2.2 - 4.5.6 - 19.0 - 1.18.8 - 0.1.54 - 1.4.0 - 7.1.0 - 2.0.0 - 5.5.13 - 2.3.23 - 1.7 - 2.0 - 1.5.2 - 2.1.1 - 1.60 - 63.1 - 1.0.0 - 3.3.3 - 2.8.1 - 4.1.0-incubating - 1.11.368 - 0.2.4 - 2.3.0 - 3.0.1 - 1.9.12 - 0.6.0 - 2.0.0.AM2 - - - - - - - - 0.8.2 - 2.2 - 3.2 - UTF-8 - 3.7.0 - 3.0.1 + 3.2.0 + 1.5 + 3.2.4 + 3.0.0 + 2.2.1 - - 1.1.6 - 1.7.19 - 1.10.19 + 3.0.1 + apitest-auth-1.2.1-SNAPSHOT-jar-with-dependencies + - - 1.4.6 - - - 5.0.6.RELEASE - - - 5.4.2.Final - - - 2.1.1 - - - 10.13.1.1 - - - 3.4.0 - - - 1.3.5 - - - 0.3.12 - - - 0.3.0 + + + io.mosip.testrig.apirig.apitest.commons + apitest-commons + 1.2.2-SNAPSHOT + + - - 1.1.2-incubating - 1.2.0.1-B1 - 0.4.7 - 3.0.0 - 2.41.2 - 2.4.0 - 3.3.9 - 3.0.7 - 6.11 - 1.13 - apitest-auth-1.2.0.1-SNAPSHOT-jar-with-dependencies - - + org.apache.maven.plugins @@ -202,166 +84,167 @@ maven-compiler-plugin - 3.5.1 + ${maven.compiler.version} - 11 - 11 + ${maven.compiler.source} + ${maven.compiler.target} -Dfile.encoding=UTF-8 - - org.apache.maven.plugins - maven-javadoc-plugin - 3.2.0 - - none - - - pl.project13.maven - git-commit-id-plugin - 3.0.1 - - - populate-git-commit-information - - revision - - - true - MM/dd/yyyy HH:mm:ss Z - 8 - true - ${project.build.outputDirectory}/git.properties - - - - - ${project.basedir}/.git - - - + org.apache.maven.plugins + maven-javadoc-plugin + ${maven.javadoc.version} + + none + + - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - + pl.project13.maven + git-commit-id-plugin + ${git.commit.id.plugin.version} + + + populate-git-commit-information + + revision + + + true + MM/dd/yyyy HH:mm:ss Z + 8 + true + + ${project.build.outputDirectory}/git.properties + + + + + ${project.basedir}/.git + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven.gpg.plugin.version} + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + org.apache.maven.plugins + maven-shade-plugin + ${maven.shade.plugin.version} + + + + shade + + + ${fileName} + + + + + + + io.mosip.testrig.apirig.testrunner.MosipTestRunner + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + ${maven.jar.plugin.version} + + + + true + true + + + ${project.name} + ${project.version} + ${user.name} + ${os.name} + ${maven.build.timestamp} + ${env.BUILD_NUMBER} + ${env.BUILD_ID} + ${env.BUILD_URL} + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven.war.plugin.version} + + + + true + true + + + ${project.name} + ${project.version} + ${user.name} + ${os.name} + ${maven.build.timestamp} + ${env.BUILD_NUMBER} + ${env.BUILD_ID} + ${env.BUILD_URL} + + + + + + org.apache.maven.plugins + maven-source-plugin + ${maven.source.plugin.version} + + + attach-sources + + jar-no-fork + + + - - - - org.apache.maven.plugins - maven-shade-plugin - 3.2.4 - - - - shade - - - ${fileName} - - - - - - io.mosip.testrig.apirig.testrunner.MosipTestRunner - - - - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - ${maven.jar.plugin.version} - - - - true - true - - - ${project.name} - ${project.version} - ${user.name} - ${os.name} - ${maven.build.timestamp} - ${env.BUILD_NUMBER} - ${env.BUILD_ID} - ${env.BUILD_URL} - - - - - - org.apache.maven.plugins - maven-war-plugin - ${maven.war.plugin.version} - - - - true - true - - - ${project.name} - ${project.version} - ${user.name} - ${os.name} - ${maven.build.timestamp} - ${env.BUILD_NUMBER} - ${env.BUILD_ID} - ${env.BUILD_URL} - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - org.apache.maven.plugins maven-antrun-plugin - 3.0.0 + ${maven.antrun.plugin.version} make-jar-executable @@ -371,26 +254,15 @@ - - + + - - - - - - - - io.mosip.testrig.apirig.apitest.commons - apitest-commons - 1.2.1-SNAPSHOT - - - - - + + \ No newline at end of file