Groovy web console

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

sander

Published 3 weeks ago by sander
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
docker = "docker run "
private formatEnvironmentVars(ArrayList envVars) {
    envVars.collect { 
        "-e \"$it\""
    }.join(" ")
}

myMap = [test: ["NOMAD_DEPLOY_urlprefix=urlprefix-s.cloud.integration.qa-mp.so/static", "NOMAD_DEPLOY_hostclassifier=nomad_worker", 
]]
print docker + formatEnvironmentVars(myMap.get('test',[]))