Skip to content

Commit

Permalink
MOSIP-36006 added the db query's, upgraded to java 21 (#807)
Browse files Browse the repository at this point in the history
* MOSIP-36024

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-36024

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-36166

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-36006

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

---------

Signed-off-by: Anup Nehe <[email protected]>
  • Loading branch information
anup-nehe authored Oct 7, 2024
1 parent c2568c3 commit e185df6
Show file tree
Hide file tree
Showing 9 changed files with 623 additions and 1,073 deletions.
43 changes: 15 additions & 28 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
release:
types: [published]
pull_request:

types: [opened, reopened, synchronize]

push:
Expand All @@ -12,7 +13,7 @@ on:
- release*
- master
- 1.0.*
- develop
- develop*
- 1.1.*
- MOSIP*
- 1.2.*
Expand Down Expand Up @@ -62,7 +63,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-maven-uitest-pmp:
uses: mosip/kattu/.github/workflows/maven-build.yml@master
uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: uitest-pmp
BUILD_ARTIFACT: uitest-pmp
Expand All @@ -73,6 +74,7 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}


build-uitest-pmp-local:
needs: build-maven-uitest-pmp
runs-on: ubuntu-latest
Expand All @@ -82,12 +84,12 @@ jobs:
SERVICE_LOCATION: uitest-pmp
BUILD_ARTIFACT: uitest-pmp-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

Expand All @@ -107,6 +109,7 @@ jobs:
cd ${{ env.SERVICE_LOCATION}}
mvn -U -B package -Dmaven.wagon.http.retryHandler.count=2 --file pom.xml -s $GITHUB_WORKSPACE/settings.xml
- name: Ready the springboot artifacts
if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }}
run: |
Expand All @@ -128,19 +131,21 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: failure() # Pick up events even if the job fails or is canceled.



build-dockers-uitest-pmp:
needs: build-uitest-pmp-local

strategy:
matrix:
include:
- SERVICE_LOCATION: 'uitest-pmp'
SERVICE_NAME: 'uitest-pmp'

BUILD_ARTIFACT: 'uitest-pmp-local'

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 @@ -165,22 +170,4 @@ jobs:
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-dockers-pmp-reactjs-ui:
strategy:
matrix:
include:
- SERVICE_LOCATION: 'pmp-reactjs-ui'
SERVICE_NAME: 'pmp-reactjs-ui'
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 }}
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 }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
30 changes: 16 additions & 14 deletions uitest-pmp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
FROM selenium/standalone-chrome:127.0.6533.119
# Start with a base image that includes Java 21
FROM openjdk:21-slim

# Install additional dependencies, such as Selenium, Chrome, and kubectl
USER root

# Define build-time arguments
RUN apt-get update && \
apt-get install -y wget curl unzip xvfb libxi6 libgconf-2-4 chromium chromium-driver

# Install kubectl
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/kubectl

# Define build-time arguments and labels
ARG SOURCE
ARG COMMIT_HASH
ARG COMMIT_ID
Expand All @@ -23,29 +33,21 @@ ARG container_user_gid=1001
# Set working directory for the user
ENV work_dir=/home/${container_user}/

ARG KUBECTL_VERSION=1.22.9

# install packages and create user
# Create a new user with specified permissions
RUN groupadd -g ${container_user_gid} ${container_user_group} \
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/bash -m ${container_user} -d ${work_dir} \
&& chown -R ${container_user}:${container_user} /home/${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}/

# Switch to the specified user for the subsequent commands
USER ${container_user_uid}:${container_user_gid}

# Copy files
# Copy your application files into the container
COPY --chown=${container_user_uid}:${container_user} --chmod=771 ./entrypoint.sh ${work_dir}/entrypoint.sh
COPY --chown=${container_user}:${container_user} ./src/main/resources/ ${work_dir}/resources/
COPY --chown=${container_user_uid}:${container_user} ./target/*.jar ${work_dir}

# Set working directory
# Set the working directory
WORKDIR /home/${container_user}/




# Entrypoint for the container
ENTRYPOINT ["/bin/bash", "-c", "./entrypoint.sh"]
Loading

0 comments on commit e185df6

Please sign in to comment.