Advertisement
Guest User

Untitled

a guest
May 8th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def call(
  2.         String taskRegExps,
  3.         String fromRevision,
  4.         String toRevision,
  5.         String flockCredential,
  6.         // @GRISHA
  7.         HashMap options,
  8.         Closure body
  9. ) {
  10. /*
  11. Options:
  12.  - pullRequestLinkTemplate - default value "..bla bla",
  13.  - taskLinkTemplate - default value "..bla bla",
  14.  - environment - default value empty "",
  15.  - deployer: {username, flockUserId},
  16.  - serviceName - default value empty "",
  17. */
  18.     def CHARON_VERSION = "master"
  19.  // ...........
  20.  
  21.    
  22.    // @GRISHA
  23.     HashMap opts = [:] << [pullRequestLinkTemplate: "..bla bla", taskLinkTemplate:  "..bla bla", environment: "", serviceName: ""] << options
  24.  
  25.     try {
  26.         body()
  27.  
  28.         try {
  29.             send(msg, false)
  30.         } (e) {
  31.             // mark build unstable
  32.             // write message "all is ok, but we can't send message to flock, check token"
  33.         }
  34.     } catch (e) {
  35.  
  36.         send(msg, true)
  37.  
  38.         throw e
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement