I tried the below code, but that doesn't ensure the parallel run.

#!groovy
stage "preparation" 
 
 
 node { 
    parallel ( 
      phase1: { 
                echo "phase1" 
              }, 
      phase2: { 
                echo "phase2" 
              } 
    ) 
 } 
 
 
 stage "do the build" 
 
 

parallel (
    
         "stream 1" : { 
                     
                      node { 
                        def now = new Date()
                        def timestampNow = now.toTimestamp()
                        println "Start: ${timestampNow}
[${timestampNow.class}]"
                        echo "hstream1"
                 } 
              },
    
                "stream 2" : { 
                     
                        node { 
                            def now = new Date()
                            def timestampNow = now.toTimestamp()
                            println "Start: ${timestampNow}
[${timestampNow.class}]"
                            echo "hashtag fail"                                 
                      
                          } 
                        }
          
)



--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/start-jenkins-sub-jobs-parallelly-tp4827908p4828292.html
Sent from the Jenkins users mailing list archive at Nabble.com.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1468836876097-4828292.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to