diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2016-11-13 15:09:41 +0200 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2016-11-13 15:09:41 +0200 |
commit | f256c29e61ef75ab3904f2a3f3e4fdb8b9ccf9ca (patch) | |
tree | 9100b9d9d7cc3bd5e6549ff9c0936011680abbee | |
parent | 15ac466c06d7849cee20a1ef306b68d04694daeb (diff) |
groovy: fix handling of lava v2 jobs in yaml
lava v2 jobs in yaml don't have a server string and cause the regex to
fail. Since the previous regex has already captured the URL, re-use it.
Change-Id: I1b62422d0529819b664ab0649f151292024f712e
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
-rw-r--r-- | post-build-lava.groovy | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/post-build-lava.groovy b/post-build-lava.groovy index 1dfd569..5d81573 100644 --- a/post-build-lava.groovy +++ b/post-build-lava.groovy @@ -8,11 +8,7 @@ if (matcher?.matches()) { lavaSubJobs = matcher.group(0).substring(14).split("]")[0].replaceAll("'", "").split(",") lavaJobId = lavaSubJobs[0] } - def lavaServer = "validation.linaro.org" - def serverMatcher = manager.getLogMatcher(".*\"server\":.*") - if (serverMatcher.matches()) { - lavaServer = serverMatcher.group(0).split("://")[1].split("/")[0] - } + def lavaServer = matcher.group(0).tokenize("/")[1] def lavaJobUrl = "https://${lavaServer}/scheduler/job/${lavaJobId}" def lavaDescription = " LAVA Job Id: <a href='${lavaJobUrl}'>${lavaJobId}</a>" |