spacepaste

  1.  
  2. def ret =sh (script: "ssh -A root@${list[0]}.${SIPDOMAIN} 'ls /tmp/tests-master/${list[0].minus(/2/)}/common -p | grep -v / | tr \'\\n\' ',' '", returnStdout: true)
  3. println ret
  4. for (job in entries(ret)) {
  5. println ${ret[0]}
  6. }
  7. Contents of the folder:
  8. =======================
  9. lab-1:/tmp/tests-master/provisioning/common# ls
  10. anotherfile crontab_test
  11. Results in Jenkins:
  12. ====================
  13. [Pipeline] echo
  14. a,otherfile
  15. cro,tab_test
  16.