Skip to content

Commit

Permalink
[MOSIP-38952] Added uitest-pmprevamp maven and dockerbuild changes in… (
Browse files Browse the repository at this point in the history
#1088)

* [MOSIP-38952] Added uitest-pmprevamp maven and dockerbuild changes in push-trigger.yml 

Signed-off-by: Praful Rakhade <prafulrakhade02@gmail.com>

* [MOSIP-38952] Added uitest-pmprevamp maven and dockerbuild changes in push -trigger.yml

Signed-off-by: techno-467 <prafulrakhade02@gmail.com>

* [MOSIP-38952] Added uitest-pmprevamp maven and dockerbuild changes in push -trigger.yml

Signed-off-by: techno-467 <prafulrakhade02@gmail.com>

---------

Signed-off-by: Praful Rakhade <prafulrakhade02@gmail.com>
Signed-off-by: techno-467 <prafulrakhade02@gmail.com>
Co-authored-by: Prafulrakhade <prafulrakhade@users.noreply.github.com>
  • Loading branch information
Prafulrakhade and Prafulrakhade authored Jan 13, 2025
1 parent dd697c2 commit 0f57f0d
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 9 deletions.
98 changes: 89 additions & 9 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}


sonar-analysis-pmp-ui:
needs: build-maven-pmp-ui
if: "${{ github.event_name != 'pull_request' }}"
Expand Down Expand Up @@ -92,7 +91,6 @@ 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 Down Expand Up @@ -127,7 +125,6 @@ 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 @@ -149,18 +146,14 @@ 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-java21
Expand All @@ -173,10 +166,9 @@ jobs:
ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }}
RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

sonar_analysis:

needs: build-uitest-pmp-local

if: "${{ github.event_name != 'pull_request' }}"
uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master
with:
Expand All @@ -189,3 +181,91 @@ jobs:
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-maven-uitest-pmprevamp:
uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: ./uitest-pmprevamp
BUILD_ARTIFACT: uitest-pmprevamp
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-uitest-pmprevamp-local:
needs: build-maven-uitest-pmprevamp
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets.dev_namespace_docker_hub }}
SERVICE_NAME: uitest-pmprevamp
SERVICE_LOCATION: uitest-pmprevamp
BUILD_ARTIFACT: uitest-pmprevamp-local
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: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- 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 uitest-pmprevamp with Maven
run: |
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: |
## FIND JARS & COPY ONLY EXECUTABLE JARs STORED UNDER TARGET DIRECTORY
find ${{ env.SERVICE_LOCATION }} -path '*/target/*' -name '*.jar' -type f -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.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-dockers-uitest-pmprevamp:
needs: build-uitest-pmprevamp-local
strategy:
matrix:
include:
- SERVICE_LOCATION: 'uitest-pmprevamp'
SERVICE_NAME: 'uitest-pmprevamp'
BUILD_ARTIFACT: 'uitest-pmprevamp-local'
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 }}
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 }}
20 changes: 20 additions & 0 deletions uitest-pmprevamp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,26 @@
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
Expand Down

0 comments on commit 0f57f0d

Please sign in to comment.