mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-18 05:18:24 +02:00
Add missing NonCPE encapsulated matches
This commit is contained in:
parent
43e9bc1167
commit
e4cef8dba4
@ -1,7 +1,9 @@
|
||||
package com.sap.piper
|
||||
|
||||
import com.cloudbees.groovy.cps.NonCPS
|
||||
import groovy.transform.Field
|
||||
|
||||
import java.util.regex.Matcher
|
||||
import java.util.regex.Pattern
|
||||
|
||||
@Field
|
||||
@ -106,3 +108,9 @@ def getPipGAV(file = 'setup.py') {
|
||||
echo "loaded ${result} from ${file}"
|
||||
return result
|
||||
}
|
||||
|
||||
@NonCPS
|
||||
private def matches(regex, input) {
|
||||
def m = new Matcher(regex, input)
|
||||
return m.matches() ? m.group(2) : ''
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user