Slave Node associate to IP or User
Hi! I am creating a Jenkins Farm, i was looking the way to link an Slave Node to a User Credential or IP. What i need is that every developer execute the jobs in they virtual machine. How can I do this? Regards -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1a799406-6486-4e93-9bd5-2a64c971593b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How to use Artifact Diff Plugin?
Probably would be useful for someone. It works for me with the following steps: 1. Create job and in post-build actions add Archive Artifacts 2. Run your job several times 3. Go to your build and in the menu you'll find link 'Artifact Diff' 4. There you'll see table with last successfull, failed, stable build - click any build you're interested in. 4.1 If you want to see diff for the custom builds, use URL %jenkins%/job/%your_job_name%/%current_build_number%/artifact-diff/%build_number_to_compare%/%your_artifaict_path%[?output=html|plain] NOTE: html format is default. Example: Comparing artifaict called 'list.json' located under 'acrhive' folder inside each build directory, compare build 4 and 5: http://localhost:8080/jenkins/job/artifact-diff/4/artifact-diff/5/list.json?output=html среда, 8 января 2014 г., 20:38:06 UTC+3 пользователь Amin Kh написал: Hi, I installed the plug-in in my Jenkins but I don’t know how to use it! Can someone provide an example of how this plug-in works? I have a Maven project on my Jenkins and want to compare the jar files in different builds. Regards, -Amin -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c7f15b03-e0c0-41e0-961c-8a7caf97f123%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
RE: [workflow plugin] set build display name
This does not work. build is not a property of WorkflowScript. Has this been implemented in a never version of the workflow plug in? I'm on Jenkins 1.580.3 LTS with Workflow plug in version 1.2. groovy.lang.MissingPropertyException: No such property: build for class: WorkflowScript at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:454) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:25) at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:17) at WorkflowScript.run(WorkflowScript:13) at Unknown.Unknown(Unknown) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:57) at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30) at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:52) at sun.reflect.GeneratedMethodAccessor1201.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:267) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:70) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:176) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:174) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Am 09.02.2015 15:45, schrieb Ginga, Dick: build.setDisplayName() -Original Message- From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroupscom] On Behalf Of Christoph Vogtländer Sent: Monday, February 09, 2015 9:32 AM To: Jenkinsci Users Subject: [workflow plugin] set build display name Hi, is it possible to set the current build display name? Changing env.BUILD_DISPLAY_NAME does not seem to have an effect. -- Thanks Christoph -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/85aa58b9759884d49c12639d8f66cf5e%40kfpc.de. For more options, visit https://groups.google.com/d/optout.
RE: [workflow plugin] set build display name
I'm sorry, from a build object call that method. build is a defined object in the Build Flow plugin I use. -Original Message- From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Christoph Vogtländer Sent: Monday, February 09, 2015 10:41 AM To: jenkinsci-users@googlegroups.com Subject: RE: [workflow plugin] set build display name This does not work. build is not a property of WorkflowScript. Has this been implemented in a never version of the workflow plug in? I'm on Jenkins 1.580.3 LTS with Workflow plug in version 1.2. groovy.lang.MissingPropertyException: No such property: build for class: WorkflowScript at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:454) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:25) at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:17) at WorkflowScript.run(WorkflowScript:13) at Unknown.Unknown(Unknown) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:57) at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30) at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:52) at sun.reflect.GeneratedMethodAccessor1201.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:267) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:70) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:176) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:174) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Am 09.02.2015 15:45, schrieb Ginga, Dick: build.setDisplayName() -Original Message- From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroupscom] On Behalf Of Christoph Vogtländer Sent: Monday, February 09, 2015 9:32 AM To: Jenkinsci Users Subject: [workflow plugin] set build display name Hi, is it possible to set the current build display name? Changing env.BUILD_DISPLAY_NAME does not seem to have an effect. -- Thanks Christoph -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/85aa58b9759884d49c12639d8f66cf5e%40kfpc.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6C6EE445A6F6CE4E8A0FFB51B071A4E26E4F467F%40AMERMBX02.PERKINELMER.NET. For more options, visit https://groups.google.com/d/optout.
Re: [workflow-plugin] Technical limitations for a workflow Groovy script
Hi, To allow certain signatures in Groovy Sandbox go to Manage Jenkins - In-process Script Approval. Please note that if you catch this kind of exceptions the signatures will not appear there. Timur суббота, 7 февраля 2015 г., 10:57:08 UTC+3 пользователь Baptiste Mathus написал: IIUC, for the moment only GStrings are whitelisted: see https://github.com/jenkinsci/workflow-plugin/blob/master/cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsWhitelist.java#L54 I guess we'll need feedback of Jesse or Kohsuke as to where they want to go about that: filing JIRAs for classes to be whitelisted? another way? IMO this is still a WIP, as you can for example read in the changelog some weeks ago - Flow scripts may now be run in a Groovy sandbox to allow regular users to define them without administrator approval. More work is likely needed to supply a reasonable method call whitelist out of the box. https://github.com/jenkinsci/workflow-plugin/blob/master/CHANGES.md#01-beta-5 Cheers 2015-02-07 8:45 GMT+01:00 Baptiste Mathus bma...@batmat.net javascript: : Hi, As the inline documentation (see the question marks on the right), this is because your code runs in sandboxed mode/you're not an admin: if *Use Groovy Sandbox* is checked, or you are not an administrator, not all APIs will be available. (Though I somehow agree that at first sight StringBuilder could be whitelisted). About sharing libraries, I guess this doc could help: https://github.com/jenkinsci/workflow-plugin/blob/master/cps-global-lib/README.md HTH 2015-02-06 21:01 GMT+01:00 Benjamin Muschko benjamin...@gmail.com javascript:: Hi, I was wondering what the technical limitations are for a workflow Groovy script, more specifically: 1) Is is possible to use classes like StringBuilder? Example: stage 'tryout' node { useStringBuilder() } def useStringBuilder() { echo Before usage StringBuilder test = new StringBuilder() echo After usage } If I use this method my in my flow.groovy script, the job never seems to print out After usage. Instead I get the message: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new java.lang.StringBuilder. Are restricted classes documented somewhere? Why is there a restriction? 2) Can you define your own classes within the Groovy script? stage 'tryout' node { new HelloWorld().printMessage() } class HelloWorld { def printMessage() { echo Hello World } } If I create an instance of a custom class, I get the following message: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method groovy.lang.GroovyObject invokeMethod java.lang.String java.lang.Object. 3) Is there a way to reuse methods or classes across multiple jobs? How do you envision reusable code? In all of these cases, I'd like to consume an existing, checked-in Groovy script via Groovy CPS DSL from SCM. Thanks, Ben -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2410ce55-ad9d-4d2b-b63c-6ebd633b85b5%40googlegroups.com https://groups.google.com/d/msgid/jenkinsci-users/2410ce55-ad9d-4d2b-b63c-6ebd633b85b5%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Baptiste Batmat MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor ! -- Baptiste Batmat MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor ! nbsp;! -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d9d3c19e-cddd-4d25-b4dc-38bb929f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [workflow plugin] inject environment variables or using parameters to prepare the run
Hi Christoph, I use the plain Jenkins parameters for that, (checkmark for This build is parameterized). The parameters passed then appear inside the Groovy script as variables but not environment values. If you need to set env value you can do the following inside your Groovy script: env.MY_VAR = MY_VAR Regards, Timur четверг, 5 февраля 2015 г., 12:30:11 UTC+3 пользователь Christoph Vogtländer написал: Hi, I want to use the workflow plugin and together with the Prepare an environment for the run feature provided by the EnvInject plug in. Unfortunately, when setting key/value pairs the variables are not available in the env workflow variable. Parameters (Dynamic Parameter Plug-in) will not show up either. Please note that this is not related to JENKINS-26050, I want to configure parameters in the project itself and not triggering it from another job. What I want to achieve is to have a common workflow stored in the SCM (Groovy CPD DSL from SCM). Different workflow jobs should all use the common workflow and be able to control behaviour (like checkout branch). The only solution I can think of is to use Groovy CPD DSL (without SCM), defining the variables I want and then using a workflow global library from the internal Git repository. I would like to avoid that because the workflow is for a specific task (e.g. nightly build) and does not really belong in a global library. Maybe just a question of the abstraction level... and personal preference. Are there other possible solutions? Christoph -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/69ef6b1c-d2ba-49da-b2f6-54f800068a5e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: workflow-plugin Serialisation issues when iterating over a list of strings
'each' is currently broken in Workflow CPS scripts. https://issues.jenkins-ci.org/browse/JENKINS-26481 On 09.02.2015, at 18:25, Brian Ray be_...@sbcglobal.net wrote: Hi Robin, The simplest Groovy idiom for iterating over a collection is hostnames.each { host - do something interesting with host ... } Does this work? Brian On Monday, February 9, 2015 at 5:48:11 AM UTC-8, Robin Tegg wrote: Hi all, I've been trying out the workflow plugin after watching the pimp-your-continuous-delivery-pipeline-with-jenkins-workflow-wjax-14 demo. And in one of the slides (24), there is an example of a for loop that looks to iterate over a list of hostnames. I've assumed that hostnames is a list def hostnames = [192.168.0.1, 192.168.0.2] for( def hostname: hostnames ) { sh ssh ${hostname} ... } I'm wondering if anyone can help with my usage of arrays/lists. I'm getting the following errors when I try the above: java.io.NotSerializableException: java.util.AbstractList$Itr Now I understand from the docs (https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md#serialization-of-local-variables) that some variables can't be serialized before a sh step might happen, but as I'm new to groovy I'm struggling to understand how the above might be achieved. I've tried in a method and inline as suggested. The workaround I have at the moment is def hostnames = [192.168.0.1, 192.168.0.2] for( int i = 0; i hostnames.size(); i++) { sh ssh ${hostnames.get(i)} ... } Any pointers would be much appreciated Thanks Robin -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9dde8b3d-04a5-4644-96a0-2930f78c4978%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/97311FCD-01FE-4B01-B69B-2C6DFA148B5A%40beckweb.net. For more options, visit https://groups.google.com/d/optout.
Build History widget: Can I change how many are shown
Hello, When navigating around my Jenkins dashboard it can sometimes be a bit slow when loading a projects main page. I think this may be down to the Build History widget, as when I minimize it the navigation becomes much quicker. Is there a way to reduce the number of builds that are display in the widget? Thanks, Steve Murphy -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c23badc0-54ac-41bf-9ef8-c1b8e14068ff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: workflow-plugin Serialisation issues when iterating over a list of strings
Hi Robin, The simplest Groovy idiom for iterating over a collection is hostnames.each { host - do something interesting with host ... } Does this work? Brian On Monday, February 9, 2015 at 5:48:11 AM UTC-8, Robin Tegg wrote: Hi all, I've been trying out the workflow plugin after watching the pimp-your-continuous-delivery-pipeline-with-jenkins-workflow-wjax-14 http://www.slideshare.net/cloudbees/pimp-your-continuous-delivery-pipeline-with-jenkins-workflow-wjax-14 demo. And in one of the slides (24), there is an example of a for loop that looks to iterate over a list of hostnames. I've assumed that hostnames is a list def hostnames = [192.168.0.1, 192.168.0.2] for( def hostname: hostnames ) { sh ssh ${hostname} ... } I'm wondering if anyone can help with my usage of arrays/lists. I'm getting the following errors when I try the above: java.io.NotSerializableException: java.util.AbstractList$Itr Now I understand from the docs (https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md#serialization-of-local-variables) that some variables can't be serialized before a sh step might happen, but as I'm new to groovy I'm struggling to understand how the above might be achieved. I've tried in a method and inline as suggested. The workaround I have at the moment is def hostnames = [192.168.0.1, 192.168.0.2] for( int i = 0; i hostnames.size(); i++) { sh ssh ${hostnames.get(i)} ... } Any pointers would be much appreciated Thanks Robin -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9dde8b3d-04a5-4644-96a0-2930f78c4978%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
RE: Slave Node associate to IP or User
I’m not sure what you mean. Are you saying that you want user ‘fred’ to be confined to the Jenkins slave on his own personal system? That wouldn’t be a Jenkins farm. --Rob From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of uzqates...@gmail.com Sent: Monday, February 09, 2015 12:11 PM To: jenkinsci-users@googlegroups.com Subject: Slave Node associate to IP or User Hi! I am creating a Jenkins Farm, i was looking the way to link an Slave Node to a User Credential or IP. What i need is that every developer execute the jobs in they virtual machine. How can I do this? Regards -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.commailto:jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1a799406-6486-4e93-9bd5-2a64c971593b%40googlegroups.comhttps://groups.google.com/d/msgid/jenkinsci-users/1a799406-6486-4e93-9bd5-2a64c971593b%40googlegroups.com?utm_medium=emailutm_source=footer. For more options, visit https://groups.google.com/d/optout. Click herehttps://www.mailcontrol.com/sr/76rP5IdX1O3GX2PQPOmvUgfUspOYWKRbrz1v0O!BQKcZBijctWZWsdyekGabpg5qZGQNskQ9zi!3vm7b4Ic+!w== to report this email as spam. This e-mail and the information, including any attachments it contains, are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message. Thank you. Please consider the environment before printing this email. -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0A40042D85E7C84DB443060EC44B3FD36D9AE60BC5%40dekaexchange07.deka.local. For more options, visit https://groups.google.com/d/optout.
Re: workflow-plugin Serialisation issues when iterating over a list of strings
Another stab in the dark. The double quotes mean the individual hostnames are GStrings instead of Strings. Maybe starting this way: def hostnames = ['192.168.0.1', '192.168.0.2'] On Monday, February 9, 2015 at 9:25:52 AM UTC-8, Brian Ray wrote: Hi Robin, The simplest Groovy idiom for iterating over a collection is hostnames.each { host - do something interesting with host ... } Does this work? Brian On Monday, February 9, 2015 at 5:48:11 AM UTC-8, Robin Tegg wrote: Hi all, I've been trying out the workflow plugin after watching the pimp-your-continuous-delivery-pipeline-with-jenkins-workflow-wjax-14 http://www.slideshare.net/cloudbees/pimp-your-continuous-delivery-pipeline-with-jenkins-workflow-wjax-14 demo. And in one of the slides (24), there is an example of a for loop that looks to iterate over a list of hostnames. I've assumed that hostnames is a list def hostnames = [192.168.0.1, 192.168.0.2] for( def hostname: hostnames ) { sh ssh ${hostname} ... } I'm wondering if anyone can help with my usage of arrays/lists. I'm getting the following errors when I try the above: java.io.NotSerializableException: java.util.AbstractList$Itr Now I understand from the docs (https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md#serialization-of-local-variables) that some variables can't be serialized before a sh step might happen, but as I'm new to groovy I'm struggling to understand how the above might be achieved. I've tried in a method and inline as suggested. The workaround I have at the moment is def hostnames = [192.168.0.1, 192.168.0.2] for( int i = 0; i hostnames.size(); i++) { sh ssh ${hostnames.get(i)} ... } Any pointers would be much appreciated Thanks Robin -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/42fa62f1-128d-471a-9fc1-d37fdbc0761f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
workflow-plugin Serialisation issues when iterating over a list of strings
Hi all, I've been trying out the workflow plugin after watching the pimp-your-continuous-delivery-pipeline-with-jenkins-workflow-wjax-14 http://www.slideshare.net/cloudbees/pimp-your-continuous-delivery-pipeline-with-jenkins-workflow-wjax-14 demo. And in one of the slides (24), there is an example of a for loop that looks to iterate over a list of hostnames. I've assumed that hostnames is a list def hostnames = [192.168.0.1, 192.168.0.2] for( def hostname: hostnames ) { sh ssh ${hostname} ... } I'm wondering if anyone can help with my usage of arrays/lists. I'm getting the following errors when I try the above: java.io.NotSerializableException: java.util.AbstractList$Itr Now I understand from the docs (https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md#serialization-of-local-variables) that some variables can't be serialized before a sh step might happen, but as I'm new to groovy I'm struggling to understand how the above might be achieved. I've tried in a method and inline as suggested. The workaround I have at the moment is def hostnames = [192.168.0.1, 192.168.0.2] for( int i = 0; i hostnames.size(); i++) { sh ssh ${hostnames.get(i)} ... } Any pointers would be much appreciated Thanks Robin -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c779e2f2-8f64-4191-a77a-f6f6699238a5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Problem running Python Script, infinite wait? (MS Windows)
Ok, I finally made it work. What I did was to install the selenium grid plugin (Jenkins), installed a slave (Selenium Grid), and then executed a Windows Command (Jenkins) with my tests controller (which executes the automated tests in an ordered fashion). Doing that I was able to run the tests, thank you all for your support! El jueves, 5 de febrero de 2015, 16:12:20 (UTC-3), Maximiliano Santa Cruz escribió: Hello everyone, I've installed Jenkins on a Windows 7 machine for testing purposes (currently evaluating an alternative for Bamboo), the thing is that one of the steps of the building process requires to run 2 python scripts; one for an automated deploy (web) and the other one to start a series of automated functional tests against the deployed Web Site. The deploy's script, runs OK. I'm using the python plugin and pasting the code in the text box, so, no problem there. The problem is the other script, it is in a file (.py), so what I did was to add a run windows command with this: *python test_Controller.py*. When Jenkins try to execute that step, it waits an indefinitely ammount of time. From Jenkins console output: ... ... [JenkinsCINET] $ python C:\Users\MAXIMI~1\AppData\Local\Temp\hudson917335008473141437.py [JenkinsCINET] $ cmd /c call C:\Users\MAXIMI~1\AppData\Local\Temp\hudson700594931508215791.bat C:\Program Files (x86)\Jenkins\workspace\JenkinsCINETpython test_Controller.py --this file has been copied to the workspace directory of the project *[PROBOLEM! here I get a waiting wheel that spins forever]* *The script is running fine when it is executed from the command line and* Jenkins service has the LogOn set with my own user. Regards. -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bde024de-2c83-468e-92b3-338798dd2516%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
RE: [workflow plugin] set build display name
build.setDisplayName() -Original Message- From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Christoph Vogtländer Sent: Monday, February 09, 2015 9:32 AM To: Jenkinsci Users Subject: [workflow plugin] set build display name Hi, is it possible to set the current build display name? Changing env.BUILD_DISPLAY_NAME does not seem to have an effect. -- Thanks Christoph -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c7d43f2440f9a6fee7b14cdb0524a001%40kfpc.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6C6EE445A6F6CE4E8A0FFB51B071A4E26E4F4163%40AMERMBX02.PERKINELMER.NET. For more options, visit https://groups.google.com/d/optout.