diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2015-05-09 19:11:09 +0300 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2015-05-09 19:11:09 +0300 |
commit | f9232ae69dbc1e6cc9e957b48fce3018f83d6226 (patch) | |
tree | 4c63017a87e2b2521e935a7cc8d8d962faa2d209 | |
parent | 244bf721fe5566510a1871621986ba835ba2c943 (diff) |
post-build-lava.groovy: support lava job id for multinode
Single node jobs are integers. If it isn't an integer, it's a multinode
job. Remove non-numeric characters and last character to get the master
job.
e.g. "['343363.0'" -> "3433630" -> "343363"
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
-rw-r--r-- | post-build-lava.groovy | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/post-build-lava.groovy b/post-build-lava.groovy index 7698ed7..4cf5304 100644 --- a/post-build-lava.groovy +++ b/post-build-lava.groovy @@ -4,6 +4,10 @@ import hudson.model.* def matcher = manager.getLogMatcher(".*LAVA Job Id.*") if (matcher?.matches()) { def lavaJobId = matcher.group(0).split(",")[0].substring(13) + if (!lavaJobId.isInteger()) { + // multinode job id + lavaJobId = lavaJobId.replaceAll(~/\D+/, "").getAt(0..-2) + } def lavaServer = "validation.linaro.org" def serverMatcher = manager.getLogMatcher(".*\"server\":.*") if (serverMatcher.matches()) { |