Groovy web console

subscribe to the feed Subscribe
to this
site

swh-12942

Published 4 months ago by dongjin kim
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
import groovy.json.JsonSlurper
 
def argString = '[{"_class":"org.jenkinsci.plugins.workflow.support.steps.build.BuildUpstreamCause","shortDescription":"Started by upstream project \"IVI_ICP_Rapid_Release_TEST\" build number 451","upstreamBuild":451,"upstreamProject":"IVI_ICP_Rapid_Release_TEST","upstreamUrl":"job/IVI_ICP_Rapid_Release_TEST/"}]'
def slurper = new JsonSlurper()
def result = slurper.parseText(argString)
print result[0].id