draft-packs icon indicating copy to clipboard operation
draft-packs copied to clipboard

Build feature branches in Maven-based draft packs

Open benvandenberg opened this issue 6 years ago • 1 comments

This pull request is a request for feedback on how the Jenkinsfile has been restructured for Maven-based draft packs. I recognize that there is a desire to move to prow commands, and that there are a lot of opinions on how to structure a build pipeline, and so this PR may not go anywhere.

The previous pipeline flow used stages to control conditional execution of steps. For example, a build stage existed for PR branches, and another build stage existed for master. Here is an example (note that an Acceptance Tests stage was added when I was experimenting with it):

image

Feature branches were not being built using the Jenkinsfile, which was fixed; in addition to building all branches, the file was re-worked so that each stage feeds into the next stage like a pipeline, where all branches go through a pre-build stage, then a build stage, etc. The conditional execution is controlled within the stage.

image

benvandenberg avatar Nov 16 '18 21:11 benvandenberg

I like this - I don't know the ins and outs of the intention of maven with Jenkins X - but knowing a tiny bit about pipeline, this does seem fairly idiomatic. I imagine there are advantages to buildign feature branches - but wont this create more builds before a PR is actually opened? is this a problem?

cc @rawlingsj @jstrachan does this look ok to you?

michaelneale avatar Nov 23 '18 00:11 michaelneale