Created
April 13, 2016 12:46
-
-
Save nextrevision/5516145a4a8eeca14e4f0be3f4c14d6c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// from http://stackoverflow.com/a/34520110 | |
node { | |
echo "I am a "+getClass().getName() | |
echo "PARAMETERS" | |
echo "==========" | |
echo getBinding().getVariables().getClass().getName() | |
def myvariables = getBinding().getVariables() | |
for (v in myvariables) { | |
echo "${v} " + myvariables.get(v) | |
} | |
echo STRING_PARAM1.getClass().getName() | |
echo "METHODS" | |
echo "=======" | |
def methods = getMetaClass().getMethods() | |
for (method in methods) { | |
echo method.getName() | |
} | |
echo "PROPERTIES" | |
echo "==========" | |
properties.each{ k, v -> | |
println "${k} ${v}" | |
} | |
echo properties | |
echo properties["class"].getName() | |
echo "ENVIRONMENT VARIABLES" | |
echo "======================" | |
echo "env is " + env.getClass().getName() | |
def envvars = env.getEnvironment() | |
envvars.each{ k, v -> | |
println "${k} ${v}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment