Build Pipeline for different OS with the same jobs

19 views
Skip to first unread message

NickA

unread,
Jan 13, 2016, 5:53:37 AM1/13/16
to Jenkins Users
Hi,

We have a build pipeline which runs jobs on Windows 7 machines/nodes (based on their name/label).
Certain jobs are linked to a node.

Here a sample flow (View: BUILD_W7):
BUILD 
---> RESET_VMS (machine_w7_1,machine_w7_2,machine_w7_3,machine_w7_4)
------> INSTAL_ON_MACHINES (machine_w7_1,machine_w7_2,machine_w7_3,machine_w7_4)
---------> RUN SMOKTEST (label:windows7)
------------> RUN TESTS1 (label:windows7)
------------> RUN TESTS2 (label:windows7)
------------> RUN TESTS3 (label:windows7)
---------------> SEND_REPORT 

Now we want to have the same flow for Windows 8; so all jobs are the same, the flow is the same; only the nodes/labels/parameters are different. (View: BUILD_W8)
BUILD 
---> RESET_VMS (machine_w8_1,machine_w8_2,machine_w8_3,machine_w8_4)
------> INSTAL_ON_MACHINES (machine_w8_1,machine_w8_2,machine_w8_3,machine_w8_4)
---------> RUN SMOKTEST (label:windows8)
------------> RUN TESTS1 (label:windows8)
------------> RUN TESTS2 (label:windows8)
------------> RUN TESTS3 (label:windows8)
---------------> SEND_REPORT

So as you see, the only difference is the machines to run on and the labels to use; we want different flows because we want to be able to run the flow on Windows 7 & 8 machines separately.
But if I create a new view: BUILD_W8 and add the existing RESET_VMS as initial job; then the parameters/labels are used from the W7 machines/labels.
And all jobs still contain the W7 setup; because apparently it is saved in the job itself.

So how can I create two flows with the same structure and jobs; but different parameters/nodes/labels?
As it is now; I would need to copy every job and add W8. :-(
BUILD_W8 
---> RESET_VMS_W8 (machine_w8_1,machine_w8_2,machine_w8_3,machine_w8_4)
------> INSTAL_ON_MACHINES_W8 (machine_w8_1,machine_w8_2,machine_w8_3,machine_w8_4)
---------> RUN SMOKTEST_W8 (label:windows8)
------------> RUN TESTS1_W8 (label:windows8)
------------> RUN TESTS2_W8 (label:windows8)
------------> RUN TESTS3_W8 (label:windows8)
---------------> SEND_REPORT_W8

I hope it's a bit clear.
Thanks,
Nick

Reply all
Reply to author
Forward
0 new messages