plugin dev questions (sqlplus-script-runner-plugin)

80 views
Skip to first unread message

Fernando Boaglio

unread,
Nov 26, 2015, 10:36:45 AM11/26/15
to Jenkins Developers
Hi,

I am happy that someone else is using my plugin and it is asking for improvements.  \o/

Now I have some questions and I hope you guys can help me out.

1. When I run my plugin, I setup  and save it global preferences, the xml is created at Jenkins Home, but when I go back everything is blank. If I run the plugin, it works fine, but the user can never see what the old configuration was.

Someone told me I should call the load method put that on my Constructor , but still not working.


2. This user is trying to run on a slave machine, should I change anything to make my plugin work on slave machines ?


3. I am aware of the translation process of Jenkins, but I don´t know how can I translate my plugin, if I put all the messages inside a properties file, how can I read this message ? Can I force a default language or Jenkins will do it for me ?


Thanks for your help

=)

Plugin source: https://github.com/jenkinsci/sqlplus-script-runner-plugin

Requested Issue: https://issues.jenkins-ci.org/browse/JENKINS-31597

--

Fernando Boaglio

│◦└̅┘◦ ◦ ﴾̭▒̭̊▒̭̊﴿ ﴾̭▓̭̊▓̭̊﴿ ﴾̭░̭̊░̭̊﴿ ◦ ◦ (͡ < ◦ ● ◦└̅┘◦│


Daniel Beck

unread,
Nov 26, 2015, 11:11:49 AM11/26/15
to jenkin...@googlegroups.com

On 26.11.2015, at 16:35, Fernando Boaglio <boa...@gmail.com> wrote:

> 1. When I run my plugin, I setup and save it global preferences, the xml is created at Jenkins Home, but when I go back everything is blank. If I run the plugin, it works fine, but the user can never see what the old configuration was.

Try using standard getters and setters (`private String oracleHome` will have the getter `public String getOracleHome()` and the setter `public void setOracleHome(String …)`) rather than what you're doing now.

> 2. This user is trying to run on a slave machine, should I change anything to make my plugin work on slave machines ?

https://wiki.jenkins-ci.org/display/JENKINS/Making+your+plugin+behave+in+distributed+Jenkins should get you started. It's also really easy to set up a slave on the same machine to test this.

> 3. I am aware of the translation process of Jenkins, but I don´t know how can I translate my plugin, if I put all the messages inside a properties file, how can I read this message ?

Everything you need to know about this is documented at https://wiki.jenkins-ci.org/display/JENKINS/Internationalization

> Can I force a default language or Jenkins will do it for me ?

Jenkins will serve the default translation (in e.g. Messages.properties) if no better matching one is found (e.g. Messages_de.properties).

Fernando Boaglio

unread,
Nov 29, 2015, 2:06:01 PM11/29/15
to Jenkins Developers

Thanks Daniel,  issues 1 and 3 solved.

About issue 2, is there any  "hello world slave plugin" source available ?
Reply all
Reply to author
Forward
0 new messages