gvalkov / jenkins-autojobs

Automatically create Jenkins jobs from template jobs and branches in a SCM repository
http://jenkins-autojobs.rtfd.org
Other
49 stars 39 forks source link

Use more than one wildcard (*) in svn branches configuratino #59

Open lxndrhnz opened 8 years ago

lxndrhnz commented 8 years ago

Hi,

in #32 autojobs was extended by the possibilty to use wildcards (*) in the branches configuration.

We introduced an additional folder level for better grouping of the projects in svn. Then we had a similar problem as in #32 because we don't want to configure one branches url for each category and add a new entry whenever a new category is created. So we just starred (*) this folder depth as well.

Without the additional folder our branches url's looked like this:

With the new additional folder level for categories, we tried to use those url's

For this project http://host/path/to/REPO/java/category1/projectA/trunk using - http://host/path/to/REPO/java/*/* results in an error when autojobs tries to process this "detected" branch: java/category1/*/java/category1/projectA/trunk

After analysing the problem it looks as if it could be easily fixed by just adding a case distinction after the recursive call of svn_wildcard_ls.

Please find the bugfix attached to this issue. patch_multiple_wildcards.zip

With this patch there is no problem with the configuratin from the example above and for each project in each category all trunk and branch jobs are created correct.

It would be great if you could apply this patch into master for the next release.

Best regards Alex