Skip to content

Commit

Permalink
[MOSIP-38703],[MOSIP-38704] & [MOSIP-38707] updated push-trigger.yml …
Browse files Browse the repository at this point in the history
…to Continue docker build only if the SNAPSHOT is present in parent pom otherwise skip

Signed-off-by: techno-467 <[email protected]>
  • Loading branch information
Prafulrakhade committed Jan 10, 2025
1 parent 297b6b3 commit 2fee294
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 55 deletions.
43 changes: 3 additions & 40 deletions .github/workflows/manual-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,8 @@ on:
type: string

jobs:
# build-maven-esignet:
# uses: mosip/kattu/.github/workflows/maven-build.yml@master
# with:
# SERVICE_LOCATION: ./
# BUILD_ARTIFACT: esignet
# 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 the Docker image manually if you want it without "-SNAPSHOT"
# manual-build-dockers:
# needs: build-maven-esignet
# if: ${{ github.event_name == 'workflow_dispatch' }} # Runs only when triggered manually
# strategy:
# matrix:
# include:
# - SERVICE_LOCATION: 'esignet-service'
# SERVICE_NAME: 'esignet'
# BUILD_ARTIFACT: 'esignet'
# - SERVICE_LOCATION: 'esignet-with-plugins'
# SERVICE_NAME: 'esignet-with-plugins'
# BUILD_ARTIFACT: 'esignet'
# 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 }}
# 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 }}

build-maven-esignet-with-plugins:
build_maven_esignet_with_plugins:
uses: mosip/kattu/.github/workflows/maven-build.yml@master
with:
SERVICE_LOCATION: ./esignet-with-plugins
Expand All @@ -61,8 +24,8 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-dockers-with-esignet-plugins:
needs: build-maven-esignet-with-plugins
build_dockers_with_esignet_plugins:
needs: build_maven_esignet_with_plugins
if: ${{ github.event_name == 'workflow_dispatch' }} # Runs only when triggered manually
strategy:
matrix:
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
- ES-842

jobs:
build-maven-esignet:
build_maven_esignet:
uses: mosip/kattu/.github/workflows/maven-build.yml@master
with:
SERVICE_LOCATION: ./
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
publish_to_nexus:
if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}"
needs: build-maven-esignet
needs: build_maven_esignet
uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master
with:
SERVICE_LOCATION: ./
Expand All @@ -109,7 +109,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

sonar_analysis:
needs: build-maven-esignet
needs: build_maven_esignet
if: "${{ github.event_name != 'pull_request' }}"
uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master
with:
Expand All @@ -123,8 +123,8 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-dockers:
needs: build-maven-esignet
build_dockers:
needs: build_maven_esignet
strategy:
matrix:
include:
Expand All @@ -144,7 +144,7 @@ jobs:
RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-maven-esignet-with-plugins:
build_maven_esignet_with_plugins:
uses: Prafulrakhade/kattu/.github/workflows/maven-build.yml@master
with:
SERVICE_LOCATION: ./esignet-with-plugins
Expand All @@ -157,8 +157,8 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-dockers-with-esignet-plugins:
needs: [build-maven-esignet-with-plugins, check_snapshot_version, publish_to_nexus]
build_dockers_esignet_with_plugins:
needs: [build_maven_esignet_with_plugins, check_snapshot_version, publish_to_nexus]
if: ${{ needs.check_snapshot_version.outputs.is_condition == 'true' }}
strategy:
matrix:
Expand All @@ -179,7 +179,7 @@ jobs:
RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-dockers-oidc-ui:
build_dockers_oidc_ui:
strategy:
matrix:
include:
Expand All @@ -197,7 +197,7 @@ jobs:
RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-maven-apitest-esignet:
build_maven_apitest_esignet:
uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: ./api-test
Expand All @@ -211,7 +211,7 @@ jobs:

publish_to_nexus_apitest_esignet:
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-esignet
needs: build_maven_apitest_esignet
uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21
with:
SERVICE_LOCATION: ./api-test
Expand All @@ -223,8 +223,8 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-apitest-esignet-local:
needs: build-maven-apitest-esignet
build_apitest_esignet_local:
needs: build_maven_apitest_esignet
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets.dev_namespace_docker_hub }}
Expand Down Expand Up @@ -269,8 +269,8 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: failure() # Pick up events even if the job fails or is canceled.

build-dockers_apitest_esignet:
needs: build-apitest-esignet-local
build_dockers_apitest_esignet:
needs: build_apitest_esignet_local
strategy:
matrix:
include:
Expand Down

0 comments on commit 2fee294

Please sign in to comment.