Is this issue intermittent by any chance ? I thought i got it working 
yesterday (the looping part) thanks to stackoverflow but it wont perform 
the loop today (on a friday!!!) 


node('windows') {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], 
doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], 
userRemoteConfigs: [[credentialsId: 'cca9c557-65b8-4c72-9176-f78d91c22907', 
url: 'g...@github.com:RocketScienceProjects/testrobocopy.git']]])

def paths = ['folder1', 'folder2', 'folder3']
def dirs = ['dst1', 'dst2', 'dst3']
   [paths, dirs].transpose().each { pd ->
     def path = pd[0]
     def dir = pd[1]
      bat "xcopy %cd%\\${path} C:\\${dir} /E /Y /V"
      bat "(robocopy %cd%\\${path} C:\\${dir}\\temp lab.conf) ^& IF 
%ERRORLEVEL% LEQ 7 exit 0"
    }
 }


PS: please dont worry abt the batch commands, they doesnt make sense. i am 
just trying to get the loop rolling :)



On Thursday, April 21, 2016 at 3:33:45 PM UTC-5, ok999 wrote:
>
> This a very basic test code for the pipleine job
>
>
> node('windows') {    
> checkout([$class: 'GitSCM', branches: [[name: '*/master']], 
> doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], 
> userRemoteConfigs: [[credentialsId: 'cca9c557-65b8-4c72-9176-f78d', url: 
> 'g...@github.com:SomeProjects/trobocopy.git']]])
>
>
> def pathMap = ['folder1':'dst1', 'folder2':'dst2', 'folder3':'dst3', 
> 'folder4':'dst4'] 
>   pathMap.each { path, dir -> 
>        bat "xcopy %cd%${path} C:\\${dir} /E /Y /V" 
>          }
> }
>
>
> The jenkins console shows 
>
> [Pipeline] End of Pipelinejava.io.NotSerializableException: 
> java.util.LinkedHashMap$Entry
>       at 
> org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)
>       at 
> org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
>       at 
> org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
>       at 
> org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
>       at 
> org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
>       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:343)
>       at java.util.HashMap.writeObject(HashMap.java:1129)
>       at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>
>
>
>
> Caused by: an exception which occurred:
>       in field locals
>       in field parent
>       in field capture
>       in field def
>       in field closures
>       in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@4d0c20da
> Finished: FAILURE
>
>

-- 
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/b847fd7d-f861-402f-b3d0-2f44198d182e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to