From f7526f6bf7f4b9ee0a4a7e743eedf6a04fb21710 Mon Sep 17 00:00:00 2001 From: Mohanachandran S Date: Wed, 5 Jun 2024 13:52:47 +0530 Subject: [PATCH 1/5] MOSIP-33173 Updated the POM version and apitest-commons version Signed-off-by: Mohanachandran S --- apitest/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apitest/pom.xml b/apitest/pom.xml index cde97477e4..40214e95c1 100644 --- a/apitest/pom.xml +++ b/apitest/pom.xml @@ -8,7 +8,7 @@ apitest-prereg Parent project of apitest-prereg https://github.com/mosip/pre-registration - 1.2.0.1-SNAPSHOT + 1.2.1-SNAPSHOT @@ -388,7 +388,7 @@ io.mosip.testrig.apirig.apitest.commons apitest-commons - 1.2.0.1-SNAPSHOT + 1.2.1-SNAPSHOT From f847e9de7ba708bad6d176566e4960adb37ed886 Mon Sep 17 00:00:00 2001 From: Mohanachandran S Date: Tue, 11 Jun 2024 11:26:51 +0530 Subject: [PATCH 2/5] MOSIP-32418 Merging java21 with develop Signed-off-by: Mohanachandran S --- .github/workflows/push-trigger.yml | 20 +- apitest/Dockerfile | 30 +- apitest/pom.xml | 480 +++++++++++------------------ 3 files changed, 198 insertions(+), 332 deletions(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index a42f1c0be7..5b54fd083e 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -18,7 +18,7 @@ on: - release* - master - 1.* - - develop + - develop* - MOSIP* jobs: @@ -94,7 +94,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} build-maven-apitest-prereg: - 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-prereg @@ -108,7 +108,7 @@ jobs: publish_to_nexus_apitest_prereg: 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-prereg - 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: @@ -128,12 +128,12 @@ jobs: SERVICE_LOCATION: apitest BUILD_ARTIFACT: apitest-prereg-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 @@ -176,7 +176,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 }} @@ -191,7 +191,7 @@ jobs: sonar_analysis_apitest_prereg: needs: build-maven-apitest-prereg 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: diff --git a/apitest/Dockerfile b/apitest/Dockerfile index 287c09bd25..fdc056e090 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 @@ -23,15 +23,6 @@ ARG container_user_gid=1001 ARG KUBECTL_VERSION=1.22.9 -# install packages and create user -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/ - # set working directory for the user WORKDIR /home/${container_user} @@ -41,14 +32,17 @@ ADD ./apitest/target/ $work_dir ADD entrypoint.sh $work_dir/entrypoint.sh -RUN chmod +x $work_dir/entrypoint.sh - -#ADD ./testNgXmlFiles/ $work_dir/testNgXmlFiles/ - -# change permissions of file inside working dir -RUN chown -R ${container_user}:${container_user} /home/${container_user} /usr/local/openjdk-11/lib/security/cacerts - -RUN chmod 644 /usr/local/openjdk-11/lib/security/cacerts +# 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 USER ${container_user_uid}:${container_user_gid} diff --git a/apitest/pom.xml b/apitest/pom.xml index 40214e95c1..eb1fbbc08f 100644 --- a/apitest/pom.xml +++ b/apitest/pom.xml @@ -6,7 +6,7 @@ apitest-prereg jar apitest-prereg - Parent project of apitest-prereg + Parent project of MOSIP Pre-Registration apitests https://github.com/mosip/pre-registration 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 - - - 1.1.6 - 1.7.19 - 1.10.19 + 3.2.0 + 1.5 + 3.2.4 + 3.0.0 + 2.2.1 - - 1.4.6 + 3.0.1 + apitest-prereg-1.2.1-SNAPSHOT-jar-with-dependencies + - - 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.1-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-prereg-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,8 +254,10 @@ - - + + @@ -380,17 +265,4 @@ - - - - - - - io.mosip.testrig.apirig.apitest.commons - apitest-commons - 1.2.1-SNAPSHOT - - - - - + \ No newline at end of file From 8f58ce8949c14df17a8aa44938cfd3f278f6347d Mon Sep 17 00:00:00 2001 From: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> Date: Wed, 19 Jun 2024 12:48:38 +0530 Subject: [PATCH 3/5] MOSIP-32418 Merging java21 with develop Signed-off-by: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 5b54fd083e..24924e1698 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -18,7 +18,7 @@ on: - release* - master - 1.* - - develop* + - develop - MOSIP* jobs: From e369d2490c595ed2222b1f97ea7d97eff5ffda0f Mon Sep 17 00:00:00 2001 From: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:53:59 +0530 Subject: [PATCH 4/5] MOSIP-32418 Merging java21 with develop Signed-off-by: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 24924e1698..4d4d313dee 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -18,12 +18,12 @@ on: - release* - master - 1.* - - develop + - develop* - MOSIP* jobs: build-maven-pre-registration: - uses: mosip/kattu/.github/workflows/maven-build.yml@master + uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21 with: SERVICE_LOCATION: ./pre-registration BUILD_ARTIFACT: pre-registration @@ -37,7 +37,7 @@ jobs: publish_to_nexus: 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-pre-registration - 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: ./pre-registration secrets: @@ -67,7 +67,7 @@ jobs: BUILD_ARTIFACT: 'pre-registration' 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 }} @@ -81,7 +81,7 @@ jobs: sonar_analysis: needs: build-maven-pre-registration 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: ./pre-registration secrets: From ce35a539e9442fb10307a628a38e7bee52ea1e62 Mon Sep 17 00:00:00 2001 From: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:56:33 +0530 Subject: [PATCH 5/5] MOSIP-32418 Merging java21 with develop Signed-off-by: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 4d4d313dee..df91e92486 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -18,12 +18,12 @@ on: - release* - master - 1.* - - develop* + - develop - MOSIP* jobs: build-maven-pre-registration: - uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21 + uses: mosip/kattu/.github/workflows/maven-build.yml@master with: SERVICE_LOCATION: ./pre-registration BUILD_ARTIFACT: pre-registration @@ -37,7 +37,7 @@ jobs: publish_to_nexus: 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-pre-registration - uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21 + uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master with: SERVICE_LOCATION: ./pre-registration secrets: @@ -67,7 +67,7 @@ jobs: BUILD_ARTIFACT: 'pre-registration' fail-fast: false name: ${{ matrix.SERVICE_NAME }} - uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21 + uses: mosip/kattu/.github/workflows/docker-build.yml@master with: SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} SERVICE_NAME: ${{ matrix.SERVICE_NAME }} @@ -81,7 +81,7 @@ jobs: sonar_analysis: needs: build-maven-pre-registration if: "${{ github.event_name != 'pull_request' }}" - uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master-java21 + uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master with: SERVICE_LOCATION: ./pre-registration secrets: @@ -133,7 +133,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: '21' + 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