Implement matrix config in Jenkins pipeline
I've recently moved to the Pipeline plugin in Jenkins. I've successfully used freestyle jobs before for my project, but now would like to test something new. My project builds for Windows and Linux, in release and in debug mode, and uses a parameter, called device , to configure some C preprocessor macros: globally #define d frame_width and frame_height differ, depending on device value. Here is my Jenkinsfile: def device_config(device) { def device_config = ""; switch(device) { case ~/^dev_[Aa]$/: device_config="""-DGLOBAL_FRAME_WIDTH=640\ -DGLOBAL_FRAME_HEIGHT=480""" break; case ~/^dev_[Ss]$