Created
March 23, 2020 18:07
-
-
Save marcosborges/443add5829b914ffc04ef2445c55e318 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
def total = 0 | |
def findInScript = "" | |
def findInName = "" | |
Jenkins.getInstance().getAllItems().each { | |
if(it?.getDescriptor().getDisplayName() == "Pipeline") { | |
if ( | |
it.getDefinition()?.getScript()?.contains(findInScript) && | |
it.getFullName().contains(findInName) | |
){ | |
println "${it.getFullName()}" | |
total++ | |
} | |
} | |
} | |
total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @mydearmuthu1978
This script is to be run in the Jenkins script console. It is in the management area near the end of the items.