I am new Jenkins. I was able to configure commit-based job trigger using Freestyle job. This way, any new commit to GitHub was triggering the given job.
But when it comes to pipeline job, I am not able to achieve the same. Please help regarding the same.
In Build Triggers section of pipeline, I have enabled GitHub hook trigger for GITScm polling.
pipeline{
agent {
node 'npm-linux'
}
options {
timeout(time: 15, unit: 'MINUTES')
disableConcurrentBuilds()
}
stages {
stage('build') {
steps {
sh 'git clone link'
sh 'mvn clean install'
}
}
}
}