Merge commit 'dad17a4f5a'
This commit is contained in:
commit
a0b6aacddf
2 changed files with 20 additions and 0 deletions
|
|
@ -97,4 +97,16 @@ def checkISMfile(String ISMfile) {
|
|||
}
|
||||
}
|
||||
|
||||
certificatethumbprints = [:]
|
||||
certificatethumbprints['floreana'] = '0FDEB0A227982C877146CA595091173AC9655479' // Authoring takes place on this machine - so this is what should be in the ISM file already
|
||||
certificatethumbprints['hawaii'] = '49FD1B361CFF35014B81940C5B046543045DD34B'
|
||||
|
||||
def selectSigningCertificate(String nodeName, String ISMfile) {
|
||||
def masterpattern = '0FDEB0A227982C877146CA595091173AC9655479'
|
||||
echo "Substituting occurrences of ${masterpattern} with ${certificatethumbprints[nodeName]} in ISM file: ${ISMfile}"
|
||||
|
||||
textutils_subst = load("${autobuilder.commonscripts()}/textutils/subst.groovy")
|
||||
textutils_subst.substitute(ISMfile, masterpattern, certificatethumbprints[nodeName])
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
|
|||
8
textutils/subst.groovy
Normal file
8
textutils/subst.groovy
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
def substitute(String filepath, String pattern, String subst) {
|
||||
fileText = readFile(file: filepath, encoding: 'UTF-8')
|
||||
def converted = fileText.replaceAll(pattern, subst)
|
||||
writeFile(file: filepath, text: converted, encoding: 'UTF-8')
|
||||
}
|
||||
|
||||
return this;
|
||||
Loading…
Add table
Add a link
Reference in a new issue