Vote count: 0
I have two jenkins jobs. Once job 1 gets over, console output shows something similar to mentioned below.
u'retest_count': 0, u'id': 12345, u'plan_id': None
Then I need to search for u'id'value and pass the value (12345) as parameter to my second job (thought of using parametrized triggers)
I tried using groovy script to get the value but doesn't work.
def matcher = manager.getLogMatcher(".*u'id'=(\\d+.*)")
if(matcher.matches()) {
pbn= matcher.group(1).substring(0)
manager.build.setDescription(pbn) // you can do anything with this here
}
Can someone help on this?
asked 30 secs ago
Using Groovy script, how to search for string (with sepcial characters) from Jenkins console and pass the value as parameter to another job?
Aucun commentaire:
Enregistrer un commentaire