-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matrix job support #7
Comments
A Matrix job wiki page has been created for planning this. A possible way to test env:
global:
- FOOBAR=foobar
matrix:
- FOO=foo BAR=bar
- FOO=bar BAR=foo In the Jenkins job there would be a matrix variable (e.g. #global variables for all matrices
export foobar=foobar
#variables per matrix index
case ${RANDMATRIXVAR_123} in
0)
export foo=foo bar=bar
;;
1)
export foo=bar bar=foo
;;
esac The indices for the |
Jenkins supports matrix exclusion and inclusion in a one line expression. !(rvm == "2.0.0" && gemfile == "Gemfile") && (rvm == "2.0.0") Will exclude builds that exactly match language: ruby
rvm:
- 1.9.2
- 2.0.0
gemfile:
- Gemfile
- gemfiles/rails4.gemfile
- gemfiles/rails32.gemfile
- gemfiles/rails31.gemfile That means only three matrix builds will actually execute. The matrix will build The above one line expression can be more generically expressed as...
|
Let's combine the previous two comments in a solid ruby example. language: ruby
rvm:
- 1.9.2 #$rvm index 0
- 2.0.0 #$rvm index 1
gemfile:
- Gemfile #$gemfile index 0
- gemfiles/rails4.gemfile #$gemfile index 1
- gemfiles/rails32.gemfile #$gemfile index 2
- gemfiles/rails31.gemfile #$gemfile index 3
matrix:
exclude:
- { rvm: 2.0.0, gemfile: Gemfile }
include:
- rvm: 2.0.0 Will turn into case ${rvm} in
0)
rvm use 1.9.2
;;
1)
rvm use 2.0.0
;;
esac
case ${gemfile}
0)
export BUNDLE_GEMFILE="Gemfile"
;;
1)
export BUNDLE_GEMFILE="gemfiles/rails4.gemfile"
;;
2)
export BUNDLE_GEMFILE="gemfiles/rails32.gemfile"
;;
3)
export BUNDLE_GEMFILE="gemfiles/rails31.gemfile"
;;
esac There will be two user-defined axes.
The matrix filter would then look like the following (based on inclusion and exclusion filters). !((rvm == "1" && gemfile = "0")) && (rvm == "1") The following matrix will execute: |
I submitted a matrix plugin feature request to allow build failures in the matrix. This is so I can replicate Travis CI |
Partial support was implemented in 4bd3291. Still need to support: env:
global:
- FOOBAR=foobar
matrix:
- FOO=foo BAR=bar
- FOO=bar BAR=foo |
Matrix exclusion has been implemented in e4edfa8. |
Matrix support has been fully implemented today leading up to commit 591f6bb. |
Jervis needs to create matrix jobs from more complicated
.jervis.yml
files which test multiple things.The text was updated successfully, but these errors were encountered: