Stopping pipeline builds easily and question on architecture

33 views
Skip to first unread message

ABostonGal ABostonGal

unread,
Oct 21, 2017, 8:19:44 AM10/21/17
to Jenkins Users
1. Two types of architecture exist on a Jenkins build server I inherited: pipeline builds (building from groovy files) and jobs building from just a build xml file. I find the pipeline builds very difficult to abort: I have to take multiple steps starting from clicking on a red x in the Executor panel for the job through to clicking on two links in the console. The jobs that run from a build xml are easy: click once on the red x in the Executor panel, and I'm done.

Is there a easier way to stop the pipeline builds?

2. Can I change the pipeline builds back to the architecture that just uses the build xml files? 


Robert Hales

unread,
Oct 21, 2017, 7:14:31 PM10/21/17
to Jenkins Users
You are probably talking freestyle vs. pipeline jobs. Pipeline are the groovy scripted ones.  

Really, the pipeline jobs SHOULD only be doing some simple logic and running the a build script (such as an ant build.xml). The pipeline code is a newer way to do it, and is a much more flexible way to chain different jobs. i.e. you can pull code from a repo, build it, test it, and deploy it, all in one job, all written as code that can be kept in version control. 

If the jobs are doing something very simple like just running and ant build.xml, then you should be able to easily rebuild those into a freestyle job. If they have used the pipeline code to actually perform the build, you would have to write and and build script. 

As to the question of aborting the jobs... What version of Jenkins do you have? Depending on what the pipeline scripts are doing, there were some bugs that caused different problems with aborting in earlier versions. It may be that you just need to upgrade your Jenkins to a newer version, or upgrade some plugins. . From my experience, the upgrades are easy.  

Scripted pipeline jobs are usually better for all but the most simple of jobs, but if you don't want to invest the time to learn how to write and maintain them, and all your jobs are simple enough, freestyle might be the way to go. 

ABostonGal ABostonGal

unread,
Oct 22, 2017, 5:27:39 AM10/22/17
to Jenkins Users
Thank you! I did look at the version and while I cannot remember exactly what it is, I seem to recall it's due for an update. Think I'll keep pipeline because there is talk about making all our processes as integrated as possible.
Your answer is so well written and easy to understand - thank you again.
Alison
Reply all
Reply to author
Forward
0 new messages