GIT Monorepo with enterprise Jenkins
My personal opinion is that each deliverable should reside in its own repository. However if one would like to keep the monorepo one could use changeset in conjunction with when:


pipeline {
    agent any
    stages {
        stage('build matchengine') {
            when {
                changeset "**/matchengine/*.*"
            }
            steps {
                echo 'building match engine'
            }
        }
        stage('build posttrade') {
            when {
                changeset "**/posttrade/*.*"
            }
            steps {
                echo 'building post trade'
            }
        }
    }
}



or change the directory in several build stage and build the code inside this directory:


stage('Build') {
  dir('web_app') {
    sh 'ls'
    sh 'git pull'
  }
}



One could also decide to use the parallel option to ensure that the build times will be shortened:


/* .. snip .. */
stage('run-parallel-branches') {
  steps {
    parallel(
      a: {
        echo "This is branch a"
      },
      b: {
        echo "This is branch b"
      }
    )
  }
}
/* .. snip .. */



Regarding the question:


  Set up Jenkins job which will trigger task only for repo where PUSH
  has occurred. e.g if my monorepo consist 2 merged repos repo1 and
  repo2 , so if any changes in repo1 should trigger only related task
  for repo1 and likewise for repo2.


I think that changeset would be most useful: a change will trigger the build, but as a change only occurred in a certain path, only that build will be started.