Created
April 6, 2021 14:34
-
-
Save cvakiitho/06e09b0a1e098944eb9c5de02321ad4d to your computer and use it in GitHub Desktop.
Jenkins list everything
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
println "\nfunctions\n***********" | |
println this.steps.functions.collect { k,v -> v.getFunctionName()} | |
println "\nstepClassNames\n***********" | |
println this.steps.stepClassNames.collect { k,v -> v.getFunctionName()} | |
println "\nunreportedAmbiguousFunctions\n***********" | |
println this.steps.unreportedAmbiguousFunctions.collect { k,v -> v.getFunctionName() } | |
println "\nallGlobalVariables\n***********" | |
println org.jenkinsci.plugins.workflow.cps.GlobalVariable.forRun(currentBuild.rawBuild).collect { var -> var.getName() } | |
println "\nallSymbols\n***********" | |
println getAllSymbols().collectMany { symbol -> org.jenkinsci.plugins.structs.SymbolLookup.getSymbolValue(symbol) } | |
@NonCPS | |
def getAllSymbols() { | |
return org.jvnet.hudson.annotation_indexer.Index.list( | |
org.jenkinsci.Symbol.class, | |
jenkins.model.Jenkins.get().pluginManager.uberClassLoader, | |
Class.class) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment