jenkins conditional matrix

jenkins, jenkins-plugins

Solution

In job configuration in Configuration Matrix category there is a checkbox Combination Filter. Add the following there:

!(label == 'Windows' && browser == 'Safari')

Assuming that label and browser are the right names of the variables you are using. If still in doubt, press "?" right of the text field. There is a very good help text there.

Problem

I need to run some Selenium tests on multiple platforms with multiple browsers and I didn't figure out how to configure the matrix for the multi-configuration project. What I want is to exclude Safari testing on the Windows node. Here is the matrix which I need to have: ``` Firefox Chrome IE Safari Windows (slave) x x x - Mac (slave) - - - x 'x'=test, '-'=ignore ``` For the execution part I can write a python script which will issue the proper commands based on the current OS

Original source