Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. @NonCPS
  2. def nonCpsTest() {
  3. def list = [
  4. ['CreationDate': '200'],
  5. ['CreationDate': '300'],
  6. ['CreationDate': '100'],
  7. ]
  8.  
  9. def rval = list.sort true, { it['CreationDate'] }
  10.  
  11. echo "Rval=$rval"
  12. echo "List=$list"
  13. }
  14.  
  15. pipeline {
  16. agent any
  17. stages {
  18. stage('default'){
  19. steps {
  20.  
  21. script {
  22.  
  23. nonCpsTest()
  24. }
  25. }
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement