Re: Parsing HTML unit test for the project configuration page
I got exact same error when I tried to build jenkins testng-plugin-plugin. Anybody knows what's wrong here? peidong On Thursday, April 17, 2014 9:30:42 AM UTC-4, pallen wrote: Hi Guys, I'm trying to write a unit test for the SCM entries in the project configuration page. @Rule public JenkinsRule jenkins = new JenkinsRule(); @Test public void testManualWorkspaceImpl() throws Exception { FreeStyleProject project = jenkins.createFreeStyleProject(Manual); PerforceScm scm = new PerforceScm(...stuff...); project.setScm(scm); project.save(); HtmlPage page = jenkins.createWebClient().getPage(project, configure); System.out.println(page.asText()); } This errors with the following: SEVERE: Unexpected exception occurred while parsing HTML snippet Apr 17, 2014 11:57:30 AM com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError SEVERE: runtimeError: message=[Unexpected exception occurred while parsing HTML snippet: input name=x] sourceName=[ http://localhost:51496/jenkins/static/fd1dcdac/scripts/prototype.js] line=[1927] lineSource=[null] lineOffset=[0] I have tried a variety of different 'plugin' versions, but currently using 1.532.3. Sorry if this is the wrong place to post, but only signed up today. Kind regards, Paul -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Parsing HTML unit test for the project configuration page
My naive understanding is that the errors you see on the console here are not necessarily a problem: Looking at line 1927 of prototype.js it seems that it is using a try/catch mechanism to determine the features supported by the javascript instance and in the case that the 'extended element create' feature is not supported you see this text. It is misleading doubtless, but you may find that the page is created as expected. On Sunday, July 20, 2014 12:37 PM, bigtester prot bigtester.p...@gmail.com wrote: I got exact same error when I tried to build jenkins testng-plugin-plugin. Anybody knows what's wrong here? peidong On Thursday, April 17, 2014 9:30:42 AM UTC-4, pallen wrote: Hi Guys, I'm trying to write a unit test for the SCM entries in the project configuration page. @Rule public JenkinsRule jenkins = new JenkinsRule(); @Test public void testManualWorkspaceImpl() throws Exception { FreeStyleProject project = jenkins. createFreeStyleProject( Manual); PerforceScm scm = new PerforceScm(...stuff...); project.setScm(scm); project.save(); HtmlPage page = jenkins.createWebClient(). getPage(project, configure); System.out.println(page. asText()); } This errors with the following: SEVERE: Unexpected exception occurred while parsing HTML snippet Apr 17, 2014 11:57:30 AM com.gargoylesoftware.htmlunit. javascript.StrictErrorReporter runtimeError SEVERE: runtimeError: message=[Unexpected exception occurred while parsing HTML snippet: input name=x] sourceName=[http://localhost: 51496/jenkins/static/fd1dcdac/ scripts/prototype.js] line=[1927] lineSource=[null] lineOffset=[0] I have tried a variety of different 'plugin' versions, but currently using 1.532.3. Sorry if this is the wrong place to post, but only signed up today. Kind regards, Paul -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Provision multiple instances of slaves with NodeProvisioner
Thumbs up for pluggable strategies! Also, I volunteer to help if reasonable guidance is provided. On Wednesday, July 16, 2014 6:24:31 PM UTC+4, Stephen Connolly wrote: idle is based on a long term average. There are two schools of thought when ramping up build resources. You can optimize for maximum resource utilization You can optimize for shortest waiting time You cannot do both at the same time. Since it is not instantaneous to start up a build node you can sometimes get a faster build if you just wait for one of the existing builds to complete... as a result firing up a build node for every job in the queue will end up wasting resources. Similarly the decommissioning strategy is likely to leave build nodes hanging around for a minute or two it would be good if we have some work they could do rather than just throw them away. The default strategy in Jenkins is to try to maintain the build queue length at approx the number of build nodes. (Yes this may shock you) In other words Jenkins wants there always to be a job ready for each node when it is finished its current work. That strategy will give the maximum utilization of resources with a secondary minimum waiting time. I intend in the near future (once I complete getting the scalability framework open sourced) to make the strategy plugable, thus allowing people to, e.g. Provision nodes while there is a demand for them - which will minimize waiting time at the expense of wasting resources At present the trick is to play with MARGIN and MARGIN0 and the decay rate so that you get nodes provisioned faster in response to the exponentially weighted average number of idle nodes changing... but be warned, adjusting these values will cause idle nodes to get provisioned depending on the build load. On 16 July 2014 15:00, yo...@ignissoft.com javascript: wrote: Hello, I'm writing a Jenkins Cloud plug-in that should work similar to EC2 plug-in. The sequence of events is as follows: 1. Jenkins decides that there are not enough slaves to run jobs 2. Jenkins access a private resource manager system to reserve and launch test set-up. The resource manager returns an IP address of the test set-up 3. Jenkins launches slave on the returned IP. 4. The job is executed on the slave 5. Once the job is completed Jenkins kills the slave and updates the resouce manager that the set-up is free. I have extended Cloud, Slave, ComputerLauncher etc and I have a plugin that does all of the above. However... Jenkins never provisions more than one slave from the resource manager cloud. Looking into the code of NodeProvisioner.update, it seems that the condition *if (idle MARGIN || needSomeWhenNoneAtAll) {*Is never met once there is one slave in the pool. When there are no slaves, *needSomeWhenNoneAtAll == true* and the *if* clause is executed. When there is one slave, *needSomeWhenNoneAtAll == false* and i*dle MARGIN* so the *if* clause is not executed. I've found out that MARGIN is set to 0.1 by default with the following code: *private static final float MARGIN = Integer.getInteger(NodeProvisioner.class.getName() + .MARGIN, 10) / 100f;* I've changed this line to *private static final float MARGIN = Integer.getInteger(NodeProvisioner.class.getName() + .MARGIN, 100) / 100f;* And forced *idle MARGIN* so the *if* clause always gets executed and Jenkins launches multiple slaves. *My questions are:*1. Why, by default, *MARGIN* is set to 0.1 so *idle MARGIN* and Jenkins does not launch more than one slave? 2. How can I change this default behaviour so Jenkins does not wait at all? So as soon as it finds out there is awaiting job it will ask to provision new slave? *Thanks,Yoram * -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Executing a shell/python command in Jenkins Dynamic Choice Parameter Plugin
Well, you can always try to fire a shell from the groovy script -- there seems to be a way to access current executor. On Friday, July 18, 2014 5:41:28 PM UTC+4, Robert Parker wrote: I'd like to create a Jenkins job where I do a backup and deploy of certain databases to a remote MongoDB instance. I'd like this build to be parameterized so that at build time the user chooses from a list of valid MongoDB hostnames and then once the user selects the valid DB hostname, a second list parameter choice box will be dynamically populated with all valid database names on that hostnames. Then once The user has selected the DB name, that will be stored in a parameter DB that can be passed to a Build Step Execute Shell script to do the actual work. My problem is that I need for a way to execute a script in the Jenkins Dynamic Parameter (Cascading) Plug-in that will run a shell (or ideally, python) script that will return a list of valid DB names on the selected host. I'm not able to get groovy script portion of the plugin to execute shell commands on the local OS (like theExecute Shell build step does). Ideally I'd like to run something like this where MONGOHOST is the first parameter chosen by the user: #!/usr/bin/env pythonfrom pymongo import MongoClient client = MongoClient('mongodb://${MONGOHOST}:27017/') choicelist = client.database_names() client.close() I'd then like choicelist to be presented in such a way as they become populated as the available choices for a DB parameter. How can I achieve this, especially since the Dynamic Choice parameter only accepts groovy script and not native python? -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Hi, I want to host my plugins
Hi,I'd like to add some plugins that I have developed to Jenkins community. And the information I should provide according to your requirement is as follows:my plugin name is pi-jobflowcreator, which provides the functionality of creatinga complete job flow based on a given one. my personal GitHub ID: icbcsdcpmoxulj Is the info enough? And I guess it could be useful for others. And I've already used it to my advantage. Best wishes Xu Lijia -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.