Workflow: How to get entire workflow definition from SCM

105 views
Skip to first unread message

KARR, DAVID

unread,
Dec 31, 2014, 3:02:38 PM12/31/14
to jenkins...@googlegroups.com
I haven't looked at an installation using the Workflow plugin, but I have a question or two.

I get the impression that the script used in a workflow job can be loaded from SCM, instead of hardcoded into the Jenkins job. How exactly do you specify that? I noticed the "load" workflow step, but that's not quite the same thing.

Alexander Bertram

unread,
Jan 3, 2015, 10:21:25 AM1/3/15
to jenkins...@googlegroups.com
One of the components of the workflow system is a plugin that provides a global git repository where you can push your groovy build scripts.

This is really quite nice because you can develop your build workflow in groovy in a way that feels very good to me as a developer -- I started out with a single script that combined a few of the steps together, but very quickly started adding a JiraClient class and then JiraIssue class and then a GitHubCommitStatus class and a HipChatClient class and you can wrap everything up together in a way that makes the UI feel very clunky.

--Alex

Jesse Glick

unread,
Jan 7, 2015, 6:29:26 PM1/7/15
to jenkins...@googlegroups.com
On Wednesday, December 31, 2014 3:02:38 PM UTC-5, David Karr wrote:
I get the impression that the script used in a workflow job can be loaded from SCM, instead of hardcoded into the Jenkins job.  How exactly do you specify that?  I noticed the "load" workflow step, but that's not quite the same thing.

‘load’ indeed presumes at least a little “bootstrap” code, such as

node('some-label') {
  git '…'
  load 'flow.groovy'
}

The workflow-cps-global-lib provides an alternate approach, with Jenkins hosting the flow, but that is not necessarily what you want either.

https://issues.jenkins-ci.org/browse/JENKINS-26101 tracks loading the complete script from a designated SCM source without any bootstrap code.

Arek Skalski

unread,
Feb 20, 2015, 4:43:51 AM2/20/15
to jenkins...@googlegroups.com
How awesome it would be actually to put gerrit inside instead of plain git?

Arek Skalski

unread,
Feb 20, 2015, 4:43:56 AM2/20/15
to jenkins...@googlegroups.com
How awesome it would be actually to put gerrit inside instead of plain git?

W dniu sobota, 3 stycznia 2015 16:21:25 UTC+1 użytkownik Alexander Bertram napisał:
Reply all
Reply to author
Forward
0 new messages