mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Fix typo and apply code formatter (#675)
This commit is contained in:
parent
49c704c9aa
commit
e51737d2ca
@ -12,7 +12,7 @@ def stash(name, include = '**/*.*', exclude = '', useDefaultExcludes = true) {
|
||||
echo "Stash content: ${name} (include: ${include}, exclude: ${exclude}, useDefaultExcludes: ${useDefaultExcludes})"
|
||||
|
||||
Map stashParams = [
|
||||
name: name,
|
||||
name : name,
|
||||
includes: include,
|
||||
excludes: exclude
|
||||
]
|
||||
@ -78,7 +78,7 @@ def unstashAll(stashContent) {
|
||||
def unstashedContent = []
|
||||
if (stashContent) {
|
||||
for (i = 0; i < stashContent.size(); i++) {
|
||||
if(stashContent[i]) {
|
||||
if (stashContent[i]) {
|
||||
unstashedContent += unstash(stashContent[i])
|
||||
}
|
||||
}
|
||||
@ -98,7 +98,7 @@ void pushToSWA(Map parameters, Map config) {
|
||||
try {
|
||||
parameters.actionName = parameters.get('actionName') ?: 'Piper Library OS'
|
||||
parameters.eventType = parameters.get('eventType') ?: 'library-os'
|
||||
parameters.jobUrlSha1 = generateSha1(env.JOB_URL)
|
||||
parameters.jobUrlSha1 = generateSha1(env.JOB_URL)
|
||||
parameters.buildUrlSha1 = generateSha1(env.BUILD_URL)
|
||||
|
||||
Telemetry.notify(this, config, parameters)
|
||||
@ -108,18 +108,18 @@ void pushToSWA(Map parameters, Map config) {
|
||||
}
|
||||
|
||||
@NonCPS
|
||||
static String fillTemplate(String templateText, Map binding){
|
||||
static String fillTemplate(String templateText, Map binding) {
|
||||
def engine = new SimpleTemplateEngine()
|
||||
String result = engine.createTemplate(templateText).make(binding)
|
||||
return result
|
||||
}
|
||||
|
||||
static String downloadSettingsFromUrl(script, String url, String targetFile = 'settings.xml'){
|
||||
static String downloadSettingsFromUrl(script, String url, String targetFile = 'settings.xml') {
|
||||
if (script.fileExists(targetFile)) {
|
||||
throw new RuntimeException("Trying to download settings file to ${targetFile}, but a file with this name already exists. Please specify a uniqe file name.")
|
||||
throw new RuntimeException("Trying to download settings file to ${targetFile}, but a file with this name already exists. Please specify a unique file name.")
|
||||
}
|
||||
|
||||
def settings = script.httpRequest url
|
||||
script.writeFile file: targetFile, text: settings.getContent()
|
||||
def settings = script.httpRequest(url)
|
||||
script.writeFile(file: targetFile, text: settings.getContent())
|
||||
return targetFile
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user