Last active
October 9, 2019 17:29
-
-
Save bitwiseman/167b46621fd6ac6316e39a6b54c16fb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent none | |
stages { | |
stage("BuildAndTest") { | |
matrix { | |
agent { | |
label "${os}" | |
} | |
when { | |
and { | |
branch 'linux' | |
not { environment name: 'os', value: 'linux'} | |
} | |
} | |
axes { | |
axis { | |
name 'os' | |
values "linux", "windows", "mac" | |
} | |
axis { | |
name 'browser' | |
values "firefox", "chrome", "safari", "ie" | |
} | |
} | |
excludes { | |
exclude { | |
axis { | |
name 'os' | |
values 'linux' | |
} | |
axis { | |
name 'browser' | |
values 'safari' | |
} | |
} | |
exclude { | |
axis { | |
name 'os' | |
notValues 'windows' | |
} | |
axis { | |
name 'browser' | |
values "ie" | |
} | |
} | |
} | |
stages { | |
stage("first") { | |
steps { | |
echo "First branch" | |
echo "OS=$os" | |
echo "BROWSER=$browser" | |
} | |
} | |
stage("second") { | |
steps { | |
echo "Second branch" | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment