3 ms·
"Every branch we push has tests run on it and reported into the chat room, so if you haven’t run them locally, you can simply push to a topic branch (even a bra
by jerhinesmith 15y ago
"Every branch we push has tests run on it and reported into the chat room, so if you haven’t run them locally, you can simply push to a topic branch (even a branch with a single commit) on the server and wait for Jenkins to tell you if it passes everything."
From this, it sounds like Jenkins is automatically picking up new topic branches, running the tests, and reporting on the results. Any suggestions on how to set something like this up? In my (very limited) experience with Hudson/Jenkins, this sounds like it wouldn't be possible without manually setting up a project for each branch.
- deleted 15y ago[deleted]
- adgar 15y agoI don't think it's possible with the typical git/github plugins out of the box. However, Jenkins lets you run any manner of scripts at different parts of the build. One simple (perhaps too simple) way to implement this would be to run a script which enumerates branches and exports the name of the most recently touched branch to an environment variable. Then, parameterize the build on that environment variable.
- mikagrml 15y agoYour approach is valid. We're doing something similar (e.g. auto-building Debian packages on each commit/push) and use git's post-receive and svn's post-commit hook to detect the modified branch and then trigger a parameterized Jenkins build which takes the branch as argument. You can even trigger different kinds of builds/tests/... depending on the branch name. Due to the nature of branching inside Git it's much more fun with Git, but it basically works for subversion as well.
- ConstantineXVI 15y agoI believe Jenkins can be set to pick up the latest commit, regardless of branch. Either they've got a plugin to handle it or they just look over the builds manually.
- technomancy 15y agoI'm curious about this too. I know Jenkins has a rest API; maybe it's attached to Github web hooks.
- dasil003 15y agoWhy would somebody downvote this?
- xbryanx 15y agoExactly! I'd love to see a post with this much detail talking about the technicals of their deploy process. Using this free-wheeling branching model, requires some very flexible deploy tools, which I don't think(?) exist in the wild. Please school me...
- rsanheim 15y agoYou use the github plugin with Jenkins, and tell Jenkins to build all branches. That's about it. edit: more details here -- this is what Relevance uses for our CI: https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin
- nosequel 15y agoI don't use jenkins, I use buildbot, but I'm sure it is quite similar. If you use github's post-receive hooks it reports all branches not just master when something changes. So if jenkins can build from a posted JSON object, it is quite simple to do. On our top level project if anyone checks into a topic branch it is built and tested automatically.
- smalls 15y agoI think atmos spills the beans on how their builds with Jenkins work... https://github.com/atmos/jinkies/wiki/Jenkins-Project-Setup https://github.com/atmos/jinkies/wiki/Jenkins-Project-Setup