Jenkins pipeline build use Jenkins file from current branch that's being built

12 views
Skip to first unread message

Daniel Anechitoaie

unread,
Aug 6, 2018, 9:50:36 AM8/6/18
to Jenkins Users
Hi,

I'm using Jenkins Pipeline job type and I have it build all branches (**) when a push to BitBucket is made.
Currently the configuration is inside Jenkins but I'd like to have it inside a Jenkinsfile.
From what I see I need to specify a different repo/branch from where to take that file. 
Can I somehow make is use the Jenkins file from current branch that's being built?

bearrito

unread,
Aug 6, 2018, 10:22:48 AM8/6/18
to Jenkins Users

bearrito

unread,
Aug 6, 2018, 10:24:08 AM8/6/18
to Jenkins Users
You likely need to change the Trustmodel.

By default the Jenkinsfile from the branch being merged into is used.

Please consider carefully the impact of allowing users to modify Jenkinsfiles. In my use case this isn't acceptable, however, it might be in yours.

Best,

-b


On Monday, August 6, 2018 at 9:50:36 AM UTC-4, Daniel Anechitoaie wrote:

Lance Lyons

unread,
Aug 6, 2018, 10:43:59 AM8/6/18
to jenkins...@googlegroups.com
unsubscribe

--
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/b1015057-1009-487c-a4c8-c1f91c3da966%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages