我需要从我的Jenkins控制台输出中获取值并将其保存到一个变量中。以下是我的代码
stage('Publish') {
steps
{
script
{
bat 'gradle publish'
}
def out = bat(script:"gradle publish", returnStdout: true )
Pattern p = Pattern.compile("INFO] Upload: .*zip")
Matcher m = p.matcher(out);
echo "value to be printed"
echo out
我需要从控制台输出中保存一个值,如上传 http:/localhost:8081repositorymaven-snapscshotomxxxxxx.zip。