Are pipelines incompatible with local developer builds?

33 views
Skip to first unread message

Sorin Ionuț Sbârnea

unread,
Aug 19, 2016, 7:20:02 AM8/19/16
to Jenkins Users
I do like Jenkins pipelines and the fact that now we can control Jenkins jobs via an inside repository file. I also love the looks of the upcoming Blue Ocean interface and I can't wait to see it as default interface.

Now, the reality is that there is a serious problem which seems to be ignored by the Jenkins development team: 

By implementing Jenkins pipelines you lose the ability to execute a build job outside jenkins. 

Due to this our current pipelines are mostly just one execution of 'make', so we can't really benefit from having the execution steps splitted and nicely-displayed by Jenkins.

Like most users we do have multi-stage bash/make scripts that are building the product.

Is there a way to implement Jenkins pipelines and still be able to run local builds? What is you take on this?

jer...@bodycad.com

unread,
Aug 19, 2016, 9:29:17 AM8/19/16
to Jenkins Users
Hi,
I think you makefile script is just fine and you should keep it this way.
I think what you want to split into stage is not what happen during the build but what goes around it.

here's an example of my jenkinsfile stages for a build:
  • stage 'Checkout'
  • stage 'Clean' // make clean most likely
  • stage 'Build'  // where you perform the general app make
  • stage 'Build Tests' // make tests
  • stage 'Run Unit Tests'
  • stage 'Run Smoke Tests'
  • stage 'Run Automated Tests'
  • stage 'Benchmark'
  • stage 'Qml Inspection'
  • stage 'Doxygen Generation'
The build should be the same as local developer are making, it just that you control the environment better on build machine. This is not the universal solution but just an example, the wanted stage depends on your code and application.

Michael Neale

unread,
Aug 21, 2016, 9:33:24 PM8/21/16
to Jenkins Users
Hi Sorin. 

Short answer: No, I don't think the aim is to be incompatible at all with local developer builds. 

If you have a build script that uses make, then it is perfectly fine to use it, even as is. There is nothing wrong with a Jenkinsfile which is just delegating to a shell script or make. 

As you mentioned you have stages in your build already, then if possible you can break them up as suggested in another post, via "stage" statements which then contain the calls to the specific steps. This aids visualisation as it breaks things up, but it is still calling your scripts to do the actual work. Of course this may not be practical in your case, which is fine, but makes it harder to show visually at the moment. 
Reply all
Reply to author
Forward
0 new messages