How to know if the pull requests are trusted ?

14 views
Skip to first unread message

Ramanathan Muthaiah

unread,
Aug 6, 2018, 7:36:50 AM8/6/18
to Jenkins Users
Hello,

We're running Jenkins v2.32.2 (agreed, it's very very old, but this is in the enterprise) and am trying to setup multibranch for one of Git repos (hosted in github enterprise - GHE).

For every build job, triggered by Jenkins multibranch, pipeline kicks in but Jenkinsfile changes in PR branch isn't picked but from 'master' !

I have searched thru' cloudbees knowledge base, and various other forums. GHE user, who created the PR, has 'write' access in that GHE repo.

Inspite of this config and setup, PR builds are falling back to Jenkinsfile from the 'master'. Is there a way to know what trust is lacking and how to fix this issue ?

/Ram

Denis Mone

unread,
Aug 6, 2018, 9:11:26 AM8/6/18
to jenkins...@googlegroups.com
Maybe you need to have your branch parametrized inside Jenkinsfile
For example:

checkout([$class: 'GitSCM',
          branches: [[name: "${sha1}"]], // parametrized value
          doGenerateSubmoduleConfigurations: false,
          extensions: [[$class: 'CleanBeforeCheckout']],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: 'credentialID', name: 'origin', refspec: "+refs/pull/*:refs/remotes/origin/pr/*", url: 'githubSshUrl']]])


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/03a7b327-f8ca-4eb2-ad32-e023bdace027%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages