triggers - Jenkins schedule multiple versions of the same build -
i have project has 3-5 different mercurial branches going @ times. want schedule weekly jenkins test run our tests on relevant branches.
what want, think, parameterized build, branch name parameter, , have list of branches, , 1 time week, run parameterized build each of parameters in list.
however, see can't send parameters triggered build. assume there plugin this. job generator right plugin? there better?
i should mention currently, doing multiple scms, , having body of build have sh loop runs through each directory , runs tests. inefficient, , pain maintain...
i can suggest 1 solution couldn't called elegant.
firstly, need create multi-configuration
project (aka matrix
project).
in project need declare 1 node
(it can existed master
node) , 1 type of axis
(for illustration branch
- careful don't utilize jenkins set environment variables variables) values corresponding each branch (for illustration default
, testing
, devel
, etc).
after need add together in project build
action in need check environment
variable (previously declared $branch
) , find branch build launched (the main thought illustrated illustration using bash
).
and need manually sources corresponding branch.
next build steps can same branches.
this approach have set of drawbacks: 1. can not triggered project changes in repository (you can check using mercurial plugin
1 branch). 2. subprojects rebuilt if have not changed. 3. appropriate statically defined branches. 4. not elegant.
but has 1 advantage versus parameterized
build: 1. artifacts (and build logs) of branches stored in separated directories (because separate subprojects).
jenkins triggers
No comments:
Post a Comment