Skip to content

Instantly share code, notes, and snippets.

@scherler
Last active June 27, 2016 11:09
Show Gist options
  • Save scherler/6bebbf8f08279d1493ea799786c9f12e to your computer and use it in GitHub Desktop.
Save scherler/6bebbf8f08279d1493ea799786c9f12e to your computer and use it in GitHub Desktop.
node {
stage 'Stage 1a'
echo 'Stage 1a'
sh 'sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 30; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx; xxx'
stage 'Stage 2'
echo 'Stage 2'
sh 'sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 30; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx; xxx'
}
node {
stage 'testing'
echo 'testig'
parallel firstBranch: {
echo 'first Branch'
sh 'sleep 300'
echo 'first Branch end'
}, secondBranch: {
echo 'Hello second Branch'
sh 'sleep 120'
echo 'second Branch end'
},
failFast: false
}
@tfennelly
Copy link

tfennelly commented Jun 27, 2016

node {
   stage 'Stage 1a'
    echo 'Stage 1a'
    sh 'sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 30; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx; xxx'

   stage 'Stage 2'
   echo 'Stage 2'
   sh 'sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 30; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx;sleep 3; echo `date` xxx; xxx'
}
node {
    stage 'testing'
    echo 'testig'
    parallel firstBranch: {
        echo 'first Branch'
        sh 'sleep 300'
        echo 'first Branch end'
    }, secondBranch: {
        echo 'Hello second Branch'
        sh 'sleep 120'   
        echo 'second Branch end'       
    },
    failFast: false
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment