MOSIP-38404- Added 2 new scenarios #110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Packet Creator Build | |
on: | |
release: | |
types: [published] | |
pull_request: | |
types: [opened, reopened, synchronize] | |
workflow_dispatch: | |
inputs: | |
message: | |
description: 'Message for manually triggering' | |
required: false | |
default: 'Triggered for Updates' | |
type: string | |
push: | |
branches: | |
- '!release-branch' | |
- release* | |
- master | |
- develop | |
- 1.* | |
- MOSIP* | |
paths: | |
- 'mosip-packet-creator/**' | |
jobs: | |
call-automationtests: | |
uses: ./.github/workflows/automationtests.yaml | |
with: | |
SERVICE_LOCATION: 'mosip-packet-creator' | |
## Recreate zips to provide support for docker unzip operation | |
recreate-packet-creator-zips: | |
needs: call-automationtests | |
runs-on: ubuntu-latest | |
env: | |
BUILD_ARTIFACT: automationtest | |
NEW_BUILD_ARTIFACT: mosip-packet-creator | |
ZIP_FILE_NAME: mosippacketcreator | |
SERVICE_LOCATION: mosip-packet-creator | |
CONFIG_LOCATION: 'src/main/resources/dockersupport/centralized/mosip-packet-creator' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
if: ${{ ( env.BUILD_ARTIFACT != 'false' ) }} | |
with: | |
name: ${{ env.BUILD_ARTIFACT }} | |
path: ./ | |
- name: recreate zip | |
run: | | |
unzip -uj "${{ env.BUILD_ARTIFACT }}.zip" -d "${{ env.SERVICE_LOCATION }}/" | |
cd ./${{env.SERVICE_LOCATION}} | |
mkdir -p build_files/config | |
cp $( find -name 'dslrig-packetcreator-*.jar' -type f ) build_files | |
cp -r ${{env.CONFIG_LOCATION}}/Biometric\ Devices build_files/Biometric\ Devices | |
#cp -r ${{env.CONFIG_LOCATION}}/config build_files/config | |
cp -r src/main/resources/application.properties build_files/config/ | |
cp -r ${{env.CONFIG_LOCATION}}/resource build_files/resource | |
cp -r ${{env.CONFIG_LOCATION}}/application.properties build_files/application.properties | |
cp -r ./src/main/resources/dockersupport/centralized/mountvolume/profile_resource ./profile_resource | |
zip -r ${{ env.NEW_BUILD_ARTIFACT }}.zip build_files/* profile_resource | |
- name: Upload the springboot jars | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.NEW_BUILD_ARTIFACT }} | |
path: ./${{env.SERVICE_LOCATION}}/${{ env.NEW_BUILD_ARTIFACT }}.zip | |
build-mosip-packet-creator-dockers: | |
needs: recreate-packet-creator-zips | |
strategy: | |
matrix: | |
include: | |
- SERVICE_LOCATION: 'mosip-packet-creator' | |
SERVICE_NAME: 'dsl-packetcreator' | |
BUILD_ARTIFACT: 'mosip-packet-creator' | |
ONLY_DOCKER: true | |
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 }} | |
ONLY_DOCKER: ${{ matrix.ONLY_DOCKER }} | |
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 }} | |
sonar_analysis: | |
needs: call-automationtests | |
if: "${{ github.event_name != 'pull_request' }}" | |
uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master-java21 | |
with: | |
SERVICE_LOCATION: ./ | |
PROJECT_KEY: mosip_mosip-dsl-test-rig | |
secrets: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
ORG_KEY: ${{ secrets.ORG_KEY }} | |
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 }} |