This should work if you use the git plugin to do it. Configure your job with both X-auto and X-dev repos.
Then open the git advanced configuration and check "Merge before build". In Post-build Actions check "Git publisher". I have a somewhat similar setup at work. -- Sami 2012/2/2 Emmanuel Grumbach <egrumb...@gmail.com>: > Hello, > > I have two git repositories: X-auto and X-dev, both have a master branch. > The X-auto one is built automatically from upstream (and can be broken from > time to time). The X-dev is the one people actually use for their daily > work. From time to time, I merge from X-auto to X-dev and run a few test > before pushing the merge to X-dev/master. > > My goal is to have Jenkins do that for me. I would like to do the following: > > 1) build X-auto > if that succeeds, then > 2) merge X-auto to X-dev and push to auto_merge_jenkins branch. Then I can > trigger an automatic test suite that can take the code from > X-dev/auto_merge_jenkins. > > All this works (almost). > I configured the Git publisher to push HEAD (which will include the result > of the merge) to X-dev/auto_merge_jenkins. The first build worked, but the > second failed since the it was a non-fast-forward push. > > So, is it possible to make the git publisher use git push -f instead of > regular git push ? > Or at least to add this as an option ? > > Currently, I push manually in the build step. > > Thanks ! > > Emmanuel Grumbach > egrumb...@gmail.com