Multibranch pipeline job not triggered when using shared libraries

+1 vote
I would highly appreciate if you could please help me with the below issue.

I am having a multibranch pipeline in Jenkins.

The JenkinsFile (pushed on the code source repository) for this multibranch pipeline is below. The job is not triggering even though I can see in the Jenkins Logs, the Push event is received from GitHub.

library(

identifier: ‘jenkins-library@master’,

retriever: modernSCM(

[

$class: ‘GitSCMSource’,

remote: ‘https://github.com/ABC/Jenkins-CommonLib.git',

credentialsId: ‘20860d33-a0da-445c-ab1c-1d26a416e3f8’

]

)

)

properties([pipelineTriggers([githubPush()])])

node {

serviceAppBuild{}

}

However, if I use below given Jenkinsfile, then Jenkins do trigger the job correctly.

library(

identifier: ‘jenkins-library@master’,

retriever: modernSCM(

[

$class: ‘GitSCMSource’,

remote: ‘https://github.com/ABC/Jenkins-CommonLib.git',

credentialsId: ‘20860d33-a0da-445c-ab1c-1d26a416e3f8’

 ]

 )

)

properties([pipelineTriggers([githubPush()])])

pipeline {

 agent any

 stages {

stage(‘Stage 1’) {

 steps {

 script {

 echo ‘Stage 1’

 }

 }

 }

stage(‘Stage 2’) {

 steps {

 script {

 echo ‘Stage 2’

 }

 }

 }

}

}

I want to do it using the first approach. But the job is not getting poked.

May 5 in Jenkins by Ubaid
• 130 points
56 views
Any specific error you are seeing in the logs?

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Jenkins

0 votes
5 answers
0 votes
0 answers

Developing Continuous Delivery Pipeline using Git, Jenkins, Maven & Tomcat - join link. Registered today but not geeting link to joinin

Developing Continuous Delivery Pipeline using Git, Jenkins, ...READ MORE

Jul 4, 2019 in Jenkins by Mukul

closed Jul 5, 2019 by Vardhan 290 views
0 votes
1 answer
0 votes
1 answer

IBM DevOps Pipeline: How to Access Artifacts from Previous Job?

Currently, both jobs inside a stage are ...READ MORE

answered Jul 5, 2018 in Jenkins by Kalgi
• 51,850 points
86 views
0 votes
2 answers

Jenkins Pipeline: Build using parameters

First, as @sophie may mentioned it you should name ...READ MORE

answered Aug 8, 2019 in Jenkins by Sirajul
• 53,110 points
3,427 views
0 votes
1 answer

Jenkins Pipeline using Openshift

Create a new service account in openshift ...READ MORE

answered Aug 8, 2018 in Jenkins by Kalgi
• 51,850 points
174 views
0 votes
1 answer

Program to execute Dockerfile using Jenkins declarative pipeline

Hey @Nishant, you can use something like ...READ MORE

answered Apr 15, 2019 in Jenkins by Kalgi
• 51,850 points
412 views
0 votes
1 answer
+1 vote
1 answer