jenkinsci / seed-plugin

Seed Jenkins plug-in
https://plugins.jenkins.io/seed/
38 stars 13 forks source link

Examples needed #21

Closed akomakom closed 8 years ago

akomakom commented 8 years ago

I apologize in advance for requesting more documentation in this manner (didn't find any other forum to do that, but hopefully this will be useful to others).

I've gone through the documentation and I'm just not getting it, and I could really use a complete example at all levels (seed, project seed, branch seed).

Here is what I'm trying to do:

As much as possible, I'm going for convention over configuration here, so I'd like to leave all settings on defaults and adjust my layout accordingly.

Problem

How do I set this up to automatically respond to branch creation/changes?

Here is what I did so far:

Let's say that I'm setting up Seed to handle a big svn project at https://my.svn.server/svn/X (which of course has trunk, branches/, tags/, etc).

  1. I did not configure any Jenkins yaml settings in Global configuration. From the documentation, it is unclear why I would need it if I'm following the Installation instructions that tell you to make a Seed job which takes all of the parameters explicitly.
  2. I did not configure any project-level seed settings. From the Wiki, I didn't get a clear understanding of where that would go or why I would need it. Does this go in the global yaml file? Does it go in my project's codebase?
  3. I did add a basic https://my.svn.server/svn/X/trunk/seed/seed.groovy script that creates a test job.
  4. Made a "seed" job that generated my "project seed" job (following Installation instructions). I now have a folder with a [X]-seed job in it. This job is parameterized and asks for the branch. I understand that running it generates a branch-related job (this actually works and picks up my seed/seed.groovy).

But... I thought that the whole point was to have this happen automatically as branches come and go? How do I tell the seed plugin, or the project seed job to watch https://my.svn.server/svn/X/trunk and https://my.svn.server/svn/X/branches/* ?

I looked through the Branching Strategies page and it seems that it only talks about configuring the Jenkins job names and not the SCM branching conventions.

In summary, a complete SVN example would be most appreciated.

dcoraboeuf commented 8 years ago

Hi,

I'll try to answer very briefly (I'm not available a lot this week, I'll be back from holidays on next week...). If you want your branch folders and pipelines generated and started automatically, you have to send events from the SCM (SVN in your case) to the Jenkins instance. If this is fully documented for GitHub or BitBucket, this is unfortunately not the case for Subversion...

What I've done in the past for a client was to call the HTTP end point from post-commit hooks installed in the Subversion server using Python. When I'm back, I'll try to provide those in the documentation.

As for your other points, you do not need the global configuration if you stick to the default settings and naming strategy (which is fine for me of course, but might be different for other projects, hence the need for a configuration...).

Best regards, Damien.

dcoraboeuf commented 8 years ago

Hi,

Version 1.0-beta is now available and I think you'll find the Quick Start page very useful. Configuration of the plug-in is now much simpler.

Best regards, Damien.