Skip to content

Commit

Permalink
INJICERT-661 Updated github workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Hitesh Jain <[email protected]>
  • Loading branch information
jainhitesh9998 committed Feb 5, 2025
1 parent 50a969f commit 5292d73
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-maven-inji-certify-with-plugins:
uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
needs: build-maven-inji-certify
with:
SERVICE_LOCATION: ./certify-service-with-plugins
Expand All @@ -47,6 +46,38 @@ jobs:
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
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 Certify with plugin with Maven
run: |
cd ${{ env.SERVICE_LOCATION}}
mvn clean package -s $GITHUB_WORKSPACE/settings.xml
- name: Ready the plugin jars
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/**/*.jar' -exec zip ${{ env.BUILD_ARTIFACT }}.zip {} +
- name: Upload the plugin jars
if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }}
uses: actions/upload-artifact@v4
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

publish_to_nexus:
if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}"
Expand Down Expand Up @@ -103,7 +134,7 @@ jobs:
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 }}x`

sonar_analysis:
needs: build-maven-inji-certify
Expand Down

0 comments on commit 5292d73

Please sign in to comment.