Groovy web console

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

Soundar Example

Published 4 months ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def basicBuildRunner = { additionalScripts=[] ->
    def scriptList = [
        'echo "a"'
    ]
    scriptList = scriptList + additionalScripts
    println 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