How to kickstart a multibranch pipeline scan?

112 views
Skip to first unread message

pisymbol

unread,
Aug 17, 2018, 11:29:24 AM8/17/18
to Jenkins Users
I have a job that creates a new branch/tag in SVN. IT does so by modifying some internal build files and then tagging it.

What I would like to do is kickstart a multibranch pipeline scan when that job completes. How can one accomplish this?

Googling has not proven very fruitful. I thought I could either use the "build" syntax or maybe issue a POST of some sort but I'm not 100% sure.

I'd rather manually kickstart the scan than poll if possible and i don't want to build the tag, just have my multibranch pipeline scan and pickup the newly tagged tree with a Jenkinsfile in it (ready and watiing!).

Thanks!

-aps

Steven Foster

unread,
Aug 18, 2018, 10:46:56 AM8/18/18
to Jenkins Users
You can use the "build" step to start a multibranch scan. Just call it on the multibranch job as you would a normal job.

pisymbol

unread,
Aug 18, 2018, 11:14:06 AM8/18/18
to jenkins...@googlegroups.com
Ok, but won't that build the branch in question? What does a sample build step look for the scan operation?

-aps

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/Ssu4iJ6D4q4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/83ff2f88-7d6f-4f20-bb9a-862d301b0b90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steven Foster

unread,
Aug 18, 2018, 11:38:47 AM8/18/18
to Jenkins Users
That depends on the behaviors configured on the multibranch project. I think by default newly discovered tag jobs don't automatically build.

if you have a multibranch project called "myproject" and it has a couple of branches under it, you can start a scan:

build job: "myproject", wait: false

this is different from building a branch where you'd specify the branch job under it

build "myproject/master"

pisymbol

unread,
Aug 18, 2018, 12:04:31 PM8/18/18
to jenkins...@googlegroups.com
On Sat, Aug 18, 2018 at 11:39 AM Steven Foster <steven...@gmail.com> wrote:
That depends on the behaviors configured on the multibranch project. I think by default newly discovered tag jobs don't automatically build.

if you have a multibranch project called "myproject" and it has a couple of branches under it, you can start a scan:

build job: "myproject", wait: false

this is different from building a branch where you'd specify the branch job under it

build "myproject/master"


Thanks Steven. Will give this a whirl! I didn't realize that if you build the project instead of the branch it results in a scan (is that documented anywhere?)

-aps
Reply all
Reply to author
Forward
0 new messages