jenkinsci / seed-plugin

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

Seed.groovy location option required #27

Closed sshepel closed 8 years ago

sshepel commented 8 years ago

There is no option in the plugin to specify the location for groovy script if you want to put it not in seed folder.

dcoraboeuf commented 8 years ago

There used to be an option in early 0.x versions, but I have removed it in versions 1.0 / 2.0 (I didn't think it would be ever used and made the code slightly more complex).

In which way would you use it?

Thanks, Damien.

sshepel commented 8 years ago

For example, if you have project structure which been approved and could not be changed. In this case you need to put all your scripts in:

/src/main/groovy/seed.groovy
dcoraboeuf commented 8 years ago

If you put seed.groovy in src/main/groovy it might be considered a project source file, compiled as such and giving compilation errors. Unless you exclude it in your build files, but this gives extra configuration work, no? That's why a location outside of the main source code makes more sense to me, either in a separate folder (like seed) or at the root of the project.

sshepel commented 8 years ago

I think you are right, it it was just an example, also I believe that it's always good when you have an option;)

dcoraboeuf commented 8 years ago

I'll think about it. Ok to do this in version 2.x ?

sshepel commented 8 years ago

Ok, sounds good! Many thanks for considering my request!

dcoraboeuf commented 8 years ago

There are actually two locations to consider:

I'll just make the folder containing those one or two files configurable.

sshepel commented 8 years ago

Thanks a lot, @dcoraboeuf!

dcoraboeuf commented 8 years ago

Not ready yet. Still need to create some integration tests, to document and to release. Should be available end of September.

sshepel commented 8 years ago

Np, anyway it's a good news for me that you decided to bring this option back!

dcoraboeuf commented 8 years ago

Tests failing in Jenkins, not locally. I will investigate before releasing.

dcoraboeuf commented 8 years ago

Available in 2.1.1. See documentation at https://github.com/jenkinsci/seed-plugin/wiki/Configuration (Script directory).

sshepel commented 7 years ago

@dcoraboeuf sorry for the late reply, but thanks a lot for this quick integration of this issue!