sarins / hudson-eclipse

Automatically exported from code.google.com/p/hudson-eclipse
0 stars 0 forks source link

parametrized project: get the list of declared parameters from last build #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. schedule new build for parametrized project
2. dialog "configure build parameters" with param1=value1 appears
3. enter all parameters manually

What is the expected output? What do you see instead?
The dialog (2.) should show parameters and values from last build. I see
allways param1=value1.

What version of the product are you using? On what operating system?
Hudson 1.304
Eclipse 3.4.2
Hudson-eclipse 1.0.6

Please provide any additional information below.
This bug is an enhancement request for new functionality :
(http://code.google.com/p/hudson-eclipse/issues/detail?id=31). For me there
are three solutions:

1. Just store parameters and values per project after user select OK in
dialog "configure build parameters". The parameters can be stored inside
config directory (workspace). If user start new build read parameters from
the store and show them.

2. Get the list of declared parameters and default values for project. For
the moment it is not possible. I filed an enhancement request:
https://hudson.dev.java.net/issues/show_bug.cgi?id=3703. We have to wait
for solution in hudson.

3. It is possible to get the list of declared parameters if there was at
least one build before. So we can use "http://server/job/myjob/n/api/xml"
to get the parameter list from element "action" (n = last build number). I
attached modified "client_demo". So it shows all projects and if element
"lastBuild" is available it shows corresponding parameters with values.

I think solution 3. can be implemented first. I have no idea about the
plugin code, but i will try to check it out :)

Andre

Original issue reported on code.google.com by andre.bo...@gmail.com on 18 May 2009 at 8:02

Attachments:

GoogleCodeExporter commented 8 years ago
Implemented option 1 in svn. Option 3 is probably pretty easy to do, but it 
will have
to wait a little.

Original comment by jre...@gmail.com on 18 May 2009 at 9:02

GoogleCodeExporter commented 8 years ago
It was fast. Thanks! I will try it later.

I just implemented the option 3. It works for me. Please verify, because i'm 
not a
java expert ;)

Andre

Original comment by andre.bo...@gmail.com on 18 May 2009 at 9:12

Attachments:

GoogleCodeExporter commented 8 years ago
I tested 1.0.7 and the option 1 works. Thanks!

Now i updated from svn and merged my patch for option 3. Please see file
ParameterizedBuildDialog.java: first the parameters from lastBuild
(job.getParameters()) are applied. If it is not valid (null) the parameters from
workspace store are loaded. Please verify.

Original comment by andre.bo...@gmail.com on 20 May 2009 at 6:07

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

the enhancement request from option 2. is fixed:
https://hudson.dev.java.net/issues/show_bug.cgi?id=3703

I created new patch for loading default parameters and tested it with Hudson 
v1.323.
I changed the parameter dialog: first the parameters from last build are loaded.
If default parameters are available the dialog shows two new buttons: "Load 
default
parameters" and "Load last build parameters".

Please verify the patch.

It would be good to create new official plugin version.

Andre

Original comment by andre.bo...@gmail.com on 10 Sep 2009 at 7:30

Attachments:

GoogleCodeExporter commented 8 years ago
I provided new patch including this fix with another issue:
http://code.google.com/p/hudson-eclipse/issues/detail?id=45#c2

I will close this one together with acceptation of issue 45 patch.

Original comment by andre.bo...@gmail.com on 29 Sep 2009 at 7:26

GoogleCodeExporter commented 8 years ago
Patch has been applied, thank you very much. However, please be careful when 
creating
patches and do not re-format whitespaces - any code cleanup should go into 
separate
patches.

Original comment by jre...@gmail.com on 1 Oct 2009 at 8:39

GoogleCodeExporter commented 8 years ago
Thanks!
I see "Remove trailing whitespace" was enabled in AnyEdit plugin -> disabled :)

Original comment by andre.bo...@gmail.com on 1 Oct 2009 at 8:53