Groovy web console

subscribe to the feed Subscribe
to this
site
Test2 (via #groovywebconsole)
tweet this snippet Tweet
this
script

Test2

Published 6 months ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def sh = { 
    println it
}
def basicBuildRunner = { additionalScripts=[] ->
    def scriptList = [
        'echo "a"'
    ]
    scriptList = scriptList + additionalScripts
    sh (script: scriptList.join('\n').toString())
}

def sonarScannerOptions = []
sonarScannerOptions << "sonar.host.url=a"
sonarScannerOptions << "sonar.login=b"
sonarScannerOptions << "sonar.sources=c"
sonarScannerOptions << "sonar.sources=."
String defaultExclusions = "aurea-central-jervis/**,test/**,tests/**,spec/**"
sonarScannerOptions << "sonar.exclusions=${defaultExclusions}"

sonarScannerOptions = sonarScannerOptions.collect {
    "-D" + it
}

sonarScannerOptions = sonarScannerOptions.join(' ')

a = "scanner ${sonarScannerOptions}"

basicBuildRunner a