Last active
November 23, 2015 20:50
-
-
Save martinda/6848c7550429cdb79c8c to your computer and use it in GitHub Desktop.
Using echo in jenkins workflow method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HashMap<String,String> cfg | |
node() { | |
echo("test") | |
String str = readFile file: '/home/martin/a.config' | |
cfg = getConfig(str) | |
echo(cfg) | |
echo("cfg: "+cfg) | |
} | |
@NonCPS HashMap<String,String> getConfig(String text) { | |
HashMap<String,String> map = new HashMap<>() | |
ConfigObject cfg = new ConfigSlurper().parse(text) | |
map.put("a", cfg.a) | |
return map | |
} | |
echo("cfg: "+cfg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment